gainput icon indicating copy to clipboard operation
gainput copied to clipboard

scrolling the mouse sometimes causes issues.

Open RicoP opened this issue 4 years ago • 0 comments

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.

RicoP avatar May 09 '20 17:05 RicoP