WinRaw: Prevent stuck mouse buttons on unfocus

This commit is contained in:
sonninnos 2025-05-27 22:43:15 +03:00
parent 03be66836e
commit b3fd3e15ed
1 changed files with 4 additions and 0 deletions

View File

@ -639,6 +639,10 @@ static void winraw_poll(void *data)
for (i = 0; i < wr->mouse_cnt; ++i)
{
/* Clear buttons when not focused */
if (!winraw_focus)
g_mice[i].flags = 0;
wr->mice[i].x = g_mice[i].x;
wr->mice[i].y = g_mice[i].y;
wr->mice[i].dlt_x = InterlockedExchange(&g_mice[i].dlt_x, 0);