mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
windows: explicitly check whether raw_mouse_enabled is true before handling Windows mouse messages
This commit is contained in:
@@ -1018,7 +1018,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mouse->relative_mode || mouse->relative_mode_warp) {
|
if (!data->videodata->raw_mouse_enabled) {
|
||||||
/* Only generate mouse events for real mouse */
|
/* Only generate mouse events for real mouse */
|
||||||
if (GetMouseMessageSource((ULONG)GetMessageExtraInfo()) != SDL_MOUSE_EVENT_SOURCE_TOUCH &&
|
if (GetMouseMessageSource((ULONG)GetMessageExtraInfo()) != SDL_MOUSE_EVENT_SOURCE_TOUCH &&
|
||||||
lParam != data->last_pointer_update) {
|
lParam != data->last_pointer_update) {
|
||||||
@@ -1041,7 +1041,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
|
|||||||
case WM_XBUTTONDBLCLK:
|
case WM_XBUTTONDBLCLK:
|
||||||
{
|
{
|
||||||
SDL_Mouse *mouse = SDL_GetMouse();
|
SDL_Mouse *mouse = SDL_GetMouse();
|
||||||
if (!mouse->relative_mode || mouse->relative_mode_warp) {
|
if (!data->videodata->raw_mouse_enabled) {
|
||||||
if (GetMouseMessageSource((ULONG)GetMessageExtraInfo()) != SDL_MOUSE_EVENT_SOURCE_TOUCH &&
|
if (GetMouseMessageSource((ULONG)GetMessageExtraInfo()) != SDL_MOUSE_EVENT_SOURCE_TOUCH &&
|
||||||
lParam != data->last_pointer_update) {
|
lParam != data->last_pointer_update) {
|
||||||
WIN_CheckWParamMouseButtons(WIN_GetEventTimestamp(), wParam, data, SDL_GLOBAL_MOUSE_ID);
|
WIN_CheckWParamMouseButtons(WIN_GetEventTimestamp(), wParam, data, SDL_GLOBAL_MOUSE_ID);
|
||||||
|
Reference in New Issue
Block a user