mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-03-31 22:30:27 +00:00
Fix for intermittent cursor snapping: don't attempt to warp the cursor when it's not in the window
This commit is contained in:
parent
d8f5d43a9c
commit
d3b56d8e32
@ -1493,6 +1493,14 @@ void video_set_cursor(void)
|
||||
#elif defined(__APPLE__)
|
||||
move = mouse_grabbed;
|
||||
#endif
|
||||
if (move) {
|
||||
// when the cursor is not in the window, the cursor position from GetMouseState is not the actual
|
||||
// cursor position, so do not warp the cursor as we don't want to actually move it.
|
||||
if (!(SDL_GetAppState() & SDL_APPMOUSEFOCUS)) {
|
||||
move = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (move) {
|
||||
int visible = SDL_ShowCursor(-1);
|
||||
if (visible) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user