RE: [GD-Windows] GetAsyncKeyState / DI
Brought to you by:
vexxed72
From: Tom F. <to...@mu...> - 2002-11-07 11:12:46
|
Unfortunately they don't capture some of the stranger keys in terribly useful ways. Tom Forsyth - Muckyfoot bloke and Microsoft MVP. This email is the product of your deranged imagination, and does not in any way imply existence of the author. > -----Original Message----- > From: Andy Glaister [mailto:an...@mi...] > Sent: 06 November 2002 21:26 > To: Ignacio Casta=F1o; gam...@li... > Subject: RE: [GD-Windows] GetAsyncKeyState / DI >=20 >=20 > Why use GetAsyncKeyState or DirectInput for typical keyboard=20 > handling at all? >=20 > You are going to get WM_KEYUP and WM_KEYDOWN messages all the=20 > time - it's pretty easy to store these results in an array -=20 > then you can have perfect up/down/pressed notifications that=20 > do not have any input focus issues. >=20 > Andy. >=20 > -----Original Message----- > From: Ignacio Casta=F1o [mailto:cas...@ya...]=20 > Sent: Wednesday, November 06, 2002 10:10 AM > To: gam...@li... > Subject: RE: [GD-Windows] GetAsyncKeyState / DI >=20 >=20 > Wayne Coles wrote:=20 > > Unfortunately the remarks section inside the MSDN=20 > documentation go on=20 > > to > > say: > >=20 > > "Although the least significant bit of the return value indicates=20 > > whether the key has been pressed since the last query, due to the=20 > > pre-emptive multitasking nature of Windows, another application can = > > call GetAsyncKeyState and receive the "recently pressed"=20 > bit instead=20 > > of your application. The behavior of the least significant=20 > bit of the=20 > > return value is retained strictly for compatibility with 16-bit=20 > > Windows applications (which are non-preemptive) and should not be=20 > > relied upon." > >=20 > > So you can't really rely upon this bit being set correctly. >=20 > Exactly, that's what I meant, the interface of=20 > GetAsyncKeyState is nice, but the real behaviour is not. >=20 >=20 > Ignacio Casta=F1o > cas...@ya... >=20 >=20 > _______________________________________________________________ > Yahoo! Messenger > Nueva versi=F3n: Webcam, voz, y mucho m=E1s =A1Gratis!=20 > Desc=E1rgalo ya desde http://messenger.yahoo.es >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm=20 > Tungsten T handheld. Power & Color in a compact size!=20 http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Gamedevlists-windows mailing list = Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm=20 Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |