mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-02-17 20:34:28 +01:00
Fixed bug 5141 - KMSDRM: manage SDL_GetGlobalMouseState()
Manuel Alfayate Corchete On the KMSDRM backend, there is no such thing as a desktop, yet some programs could (and DO) use SDL_GetGlobalMouseState(). So I think its good idea that, in KMSDRM, it returns the same mouse coordinates anyway as SDL_GetMouseState() would return. There is nothing else it could return, as far as I can understand, since there is no desktop anyway. This small patch does precisely that.
This commit is contained in:
parent
1df0a1e497
commit
437577f91e
@ -466,6 +466,8 @@ KMSDRM_InitMouse(_THIS)
|
|||||||
mouse->FreeCursor = KMSDRM_FreeCursor;
|
mouse->FreeCursor = KMSDRM_FreeCursor;
|
||||||
mouse->WarpMouse = KMSDRM_WarpMouse;
|
mouse->WarpMouse = KMSDRM_WarpMouse;
|
||||||
mouse->WarpMouseGlobal = KMSDRM_WarpMouseGlobal;
|
mouse->WarpMouseGlobal = KMSDRM_WarpMouseGlobal;
|
||||||
|
/* No desktop on KMSDRM, so just return the normal mouse state. */
|
||||||
|
mouse->GetGlobalMouseState = SDL_GetMouseState;
|
||||||
|
|
||||||
SDL_SetDefaultCursor(KMSDRM_CreateDefaultCursor());
|
SDL_SetDefaultCursor(KMSDRM_CreateDefaultCursor());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user