This fixes #32. Strictly follows the Win32 version.
EDIT:
On Win32, KID_MOUSEWHEELUP and KID_MOUSEWHEELDOWN reset only when bPreScan is false. However, in the SDL implementation, they reset on every frame, without checking the bPreScan variable. AFAIK weapon switch seems to only trigger once per 'bPreScan' flip, not per frame.
Of course, we can just surround the reset with a simple if check for bPreScan, but I wanted to restore the original scrolling code (which actually accumulates the scrolls rather than just having an on/off state), hence the changes.
This fixes #32. Strictly follows the Win32 version.
EDIT: On Win32,
KID_MOUSEWHEELUP
andKID_MOUSEWHEELDOWN
reset only whenbPreScan
is false. However, in the SDL implementation, they reset on every frame, without checking thebPreScan
variable. AFAIK weapon switch seems to only trigger once per 'bPreScan' flip, not per frame.Of course, we can just surround the reset with a simple if check for
bPreScan
, but I wanted to restore the original scrolling code (which actually accumulates the scrolls rather than just having an on/off state), hence the changes.