mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-06-02 13:41:37 +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__)
|
#elif defined(__APPLE__)
|
||||||
move = mouse_grabbed;
|
move = mouse_grabbed;
|
||||||
#endif
|
#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) {
|
if (move) {
|
||||||
int visible = SDL_ShowCursor(-1);
|
int visible = SDL_ShowCursor(-1);
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user