Ignore SDL_MOUSEBUTTONDOWN events incompatible with SPICE (#38)

* Ignore SDL_MOUSEBUTTONDOWN events that aren't compatible with the SPICE PS/2 mouse
This commit is contained in:
Aaron authored and Geoffrey McRae committed 2018-01-15 10:55:17 +11:00
1 parent a02087e5e4
commit 3d9d275d61
1 file changed
+7 -1
+7 -1
View File
@@ -587,6 +587,9 @@ int eventThread(void * arg)
}
case SDL_MOUSEBUTTONDOWN:
// The SPICE protocol doesn't support more than a standard PS/2 3 button mouse
if (event.button.button > 3)
break;
if (
!spice_mouse_position(event.button.x, event.button.y) ||
!spice_mouse_press(event.button.button)
@@ -598,6 +601,9 @@ int eventThread(void * arg)
break;
case SDL_MOUSEBUTTONUP:
// The SPICE protocol doesn't support more than a standard PS/2 3 button mouse
if (event.button.button > 3)
break;
if (
!spice_mouse_position(event.button.x, event.button.y) ||
!spice_mouse_release(event.button.button)
@@ -1418,4 +1424,4 @@ int main(int argc, char * argv[])
return ret;
}
}