Index:
[thread]
[date]
[subject]
[author]
From: Hartmut Niemann <niemann@cip.e-technik.uni-erlangen.de>
To : ggi-develop@eskimo.com
Date: Tue, 22 Sep 1998 10:28:20 +0200 (MESZ)
Re: Other event tweakings
>
> teunis writes:
>
> > Got another way? It -has- to be bitflags as multiple keys can be pressed
> > simultaneously.
>
> At nanosecond resolution, `simultaneously' is humanly impossible. A
> check for simultaneity is thus sanestly done thusly :
>
> if (ABS(ev1.time - ev2.time) <= MAX_TIME_DIFF) {
> /* events considered `simultaneous' */
> ...
> }
>
> Cheers,
> _____________________________________________ ____
> \ /
> Andrew Apted <andrew@ggi-project.org> \/
>
>
>
But you don't poll joysticks that often. (OK, you could generate two
events then , and you probably would) A normal keyboard sends you every
keypress, but an analog joystick might be checked only at 1ms intervals,
and then you come close to pressing simultanously.
Hartmut.
--
Hartmut Niemann -- niemann(a)cip.e-technik.uni-erlangen.de
http://cip2.e-technik.uni-erlangen.de:8080/hyplan/niemann/index_en.html [/ggi]
Index:
[thread]
[date]
[subject]
[author]