[gnome-games/wip/exalm/rebrand: 117/124] retro-gamepad: Move to gamepad/ and rename to GamepadController




commit 6ca405cb5150d5d65fdea16e5b98afc163a06e14
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Mar 31 01:09:15 2021 +0500

    retro-gamepad: Move to gamepad/ and rename to GamepadController

 .../retro-gamepad.vala => gamepad/gamepad-controller.vala}   |  4 ++--
 src/meson.build                                              |  2 +-
 src/retro/retro-input-manager.vala                           | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/retro/retro-gamepad.vala b/src/gamepad/gamepad-controller.vala
similarity index 96%
rename from src/retro/retro-gamepad.vala
rename to src/gamepad/gamepad-controller.vala
index 32ce1368..fb6c6687 100644
--- a/src/retro/retro-gamepad.vala
+++ b/src/gamepad/gamepad-controller.vala
@@ -1,6 +1,6 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
-private class Games.RetroGamepad : Object, Retro.Controller {
+private class Games.GamepadController : Object, Retro.Controller {
        private const uint16 RUMBLE_DURATION_MS = int16.MAX;
 
        public Manette.Device device { get; construct; }
@@ -9,7 +9,7 @@ private class Games.RetroGamepad : Object, Retro.Controller {
        private int16[] axes;
        private uint16 rumble_effect[2];
 
-       public RetroGamepad (Manette.Device device) {
+       public GamepadController (Manette.Device device) {
                Object (device: device);
        }
 
diff --git a/src/meson.build b/src/meson.build
index 23643893..b399bef1 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -57,6 +57,7 @@ vala_sources = [
   'dummy/dummy-cover.vala',
   'dummy/dummy-icon.vala',
 
+  'gamepad/gamepad-controller.vala',
   'gamepad/gamepad-dpad.vala',
   'gamepad/gamepad-input.vala',
   'gamepad/gamepad-mapper.vala',
@@ -142,7 +143,6 @@ vala_sources = [
   'preferences/preferences-window.vala',
 
   'retro/retro-error.vala',
-  'retro/retro-gamepad.vala',
   'retro/retro-input-manager.vala',
   'retro/retro-options.vala',
 
diff --git a/src/retro/retro-input-manager.vala b/src/retro/retro-input-manager.vala
index 3330e273..cfe3f885 100644
--- a/src/retro/retro-input-manager.vala
+++ b/src/retro/retro-input-manager.vala
@@ -52,10 +52,10 @@ private class Games.RetroInputManager : Object {
                Manette.Device device = null;
                while (iterator.next (out device)) {
                        var port = controllers.length;
-                       var retro_gamepad = new RetroGamepad (device);
+                       var gamepad = new GamepadController (device);
                        devices += device;
-                       controllers += retro_gamepad;
-                       core.set_controller (port, retro_gamepad);
+                       controllers += gamepad;
+                       core.set_controller (port, gamepad);
                        device.disconnected.connect (on_device_disconnected);
                }
 
@@ -96,9 +96,9 @@ private class Games.RetroInputManager : Object {
                // connected as a last resort.
                var port = core_view_joypad_port;
                devices[port] = device;
-               var retro_gamepad = new RetroGamepad (device);
-               controllers[port] = retro_gamepad;
-               core.set_controller (port, retro_gamepad);
+               var gamepad = new GamepadController (device);
+               controllers[port] = gamepad;
+               core.set_controller (port, gamepad);
                device.disconnected.connect (on_device_disconnected);
 
                // Assign the CoreView's joypad to another disconnected port if it


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