[Bug 29366] GTAIV native trainer doesn't catch some key presses

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jan 13 18:33:40 CST 2012


http://bugs.winehq.org/show_bug.cgi?id=29366

--- Comment #4 from Ruslan <b7.10110111 at gmail.com> 2012-01-13 18:33:40 CST ---
OK, after some experiments it appeared that the trainer waits for 0th bit set
for all these non-working keys. So, this line in GetAsyncKeyState():
return (thread_info->key_state[key] & 0x80) ? 0x8000 : 0;
never gives the value it wants (i.e. 0x8001), no matter whether the user has
pressed the key after last call to GetAsyncKeyState() or not.
If I change the code to return 0x8001, then the keys work, and also one of the
trainer features which didn't work in Wine before starts to work (Fast Run).
Though, it seems to work *too* fast than I have seen it in windows, but this
might be because of higher frame rate on this machine.

So, what about changing 0x8000 to 0x8001? Another solution would be to truely
check if the key has been pressed between function calls.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list