[gnome-games/wip/aplazas/options: 4/5] retro-runner: Define whether to grab the pointer



commit a7ec594bcaa8b0607f715fce3ce587f8cc6a2453
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Nov 24 09:35:45 2017 +0100

    retro-runner: Define whether to grab the pointer
    
    Grab the mouse pointer fo retro games if they support the mouse but not
    the pointer.

 src/retro/retro-runner.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 9a30a31..9f6c4e9 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -190,6 +190,9 @@ public class Games.RetroRunner : Object, Runner {
                settings.changed["video-filter"].connect (on_video_filter_changed);
                on_video_filter_changed ();
 
+               view.can_grab_pointer = input_capabilities.get_allow_mouse () &&
+                                       !input_capabilities.get_allow_pointer ();
+
                prepare_core ();
 
                var present_analog_sticks = input_capabilities.get_allow_analog_gamepads ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]