From a3debd32825c710ebc1ed4c84c94e5f2187f59d2 Mon Sep 17 00:00:00 2001 From: ink0rr Date: Thu, 12 Feb 2026 11:46:23 +0700 Subject: [PATCH] gameinput: Initialize mouseState.buttons before applying flags. --- dlls/gameinput/mouinput.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/gameinput/mouinput.c b/dlls/gameinput/mouinput.c index 21d7bf0087f..4739462e748 100644 --- a/dlls/gameinput/mouinput.c +++ b/dlls/gameinput/mouinput.c @@ -302,6 +302,7 @@ HRESULT mouse_input_device_ReadCurrentStateFromDInput8( IN v2_IGameInputDevice * mouseState.wheelY = relativeWheelStore; } + mouseState.buttons = GameInputMouseNone; if ( GetAsyncKeyState( VK_LBUTTON ) & 0x8000 ) mouseState.buttons |= GameInputMouseLeftButton; if ( GetAsyncKeyState( VK_RBUTTON ) & 0x8000 )