[gnome-games] retro-input-manager: Set default controllers



commit 6e019f09b53faffea1c26cfbb44c49954a12e8b4
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sun Oct 29 22:43:00 2017 +0100

    retro-input-manager: Set default controllers

 src/retro/retro-input-manager.vala |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/retro/retro-input-manager.vala b/src/retro/retro-input-manager.vala
index c6c7dd4..83537f4 100644
--- a/src/retro/retro-input-manager.vala
+++ b/src/retro/retro-input-manager.vala
@@ -15,6 +15,13 @@ private class Games.RetroInputManager : Object {
                core_view_joypad = view.as_controller (Retro.ControllerType.JOYPAD);
                core.set_keyboard (view);
 
+               var default_joypad = view.as_controller (Retro.ControllerType.JOYPAD);
+               var default_mouse = view.as_controller (Retro.ControllerType.MOUSE);
+               var default_pointer = view.as_controller (Retro.ControllerType.POINTER);
+               core.set_default_controller (port, default_joypad);
+               core.set_default_controller (port, default_mouse);
+               core.set_default_controller (port, default_pointer);
+
                gamepad_monitor = GamepadMonitor.get_instance ();
                gamepad_monitor.foreach_gamepad ((gamepad) => {
                        var port = controllers.length;


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