Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

scrolling the mouse sometimes causes issues. #73

Open
RicoP opened this issue May 9, 2020 · 0 comments
Open

scrolling the mouse sometimes causes issues. #73

RicoP opened this issue May 9, 2020 · 0 comments

Comments

@RicoP
Copy link

RicoP commented May 9, 2020

I noticed sometimes when I scroll with my scrollwheel gainput crashes because the buttonID is not correctly initialized. I debuged the code, and the reason is that for some reason windows sends out wheel message with a scrollwheel delta of Zero. The code to handle the scrollwheel explicitly skips this case and leaves buttonID uninitialized. a additional else return would fix this case.

				int wheel = GET_WHEEL_DELTA_WPARAM(msg.wParam);
				if (wheel < 0)
				{ 
					buttonId = MouseButton4;
					pressed = true;
				}
				else if (wheel > 0)
				{
					buttonId = MouseButton3;
					pressed = true;
				} else return;

I can't do it myself right now because I already have a fork which is three years old and I dont wanna delete it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant