Fixed: Incorrect assumption that mouse button is released when window is allocated

This commit is contained in:
Zach Reedy 2022-03-10 17:12:33 -05:00 committed by Sam Lantinga
parent 7495b98141
commit 363c36781d
2 changed files with 2 additions and 2 deletions

View File

@ -374,7 +374,7 @@ WIN_CheckAsyncMouseRelease(SDL_WindowData *data)
if (!(keyState & 0x8000)) {
WIN_CheckWParamMouseButton(SDL_FALSE, mouseFlags, swapButtons, data, SDL_BUTTON_X2, 0);
}
data->mouse_button_flags = 0;
data->mouse_button_flags = (WPARAM)-1;
}
static void

View File

@ -188,7 +188,7 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, HWND parent, SDL_bool cre
data->hinstance = (HINSTANCE) GetWindowLongPtr(hwnd, GWLP_HINSTANCE);
data->created = created;
data->high_surrogate = 0;
data->mouse_button_flags = 0;
data->mouse_button_flags = (WPARAM)-1;
data->last_pointer_update = (LPARAM)-1;
data->videodata = videodata;
data->initializing = SDL_TRUE;