[gnome-games/wip/exalm/n64: 17/21] retro-input-manager: Add controllers-changed signal
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/n64: 17/21] retro-input-manager: Add controllers-changed signal
- Date: Thu, 26 Mar 2020 18:51:32 +0000 (UTC)
commit 4d1c0d91fe5f3c47f644e2c7dc3c4c4a02ab9f88
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Mar 26 23:49:37 2020 +0500
retro-input-manager: Add controllers-changed signal
src/retro/retro-input-manager.vala | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/retro/retro-input-manager.vala b/src/retro/retro-input-manager.vala
index 97f6047a..3330e273 100644
--- a/src/retro/retro-input-manager.vala
+++ b/src/retro/retro-input-manager.vala
@@ -1,6 +1,8 @@
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.RetroInputManager : Object {
+ public signal void controllers_changed ();
+
private Retro.Core core;
private Retro.CoreView view;
private Retro.Controller core_view_joypad;
@@ -108,6 +110,8 @@ private class Games.RetroInputManager : Object {
devices[core_view_joypad_port] = null;
update_core_view_gamepad ();
+ controllers_changed ();
+
return;
}
}
@@ -118,6 +122,8 @@ private class Games.RetroInputManager : Object {
devices += null;
controllers += null;
update_core_view_gamepad ();
+
+ controllers_changed ();
}
private void on_device_disconnected (Manette.Device device) {
@@ -144,5 +150,7 @@ private class Games.RetroInputManager : Object {
controllers[port] = null;
core.set_controller (port, null);
}
+
+ controllers_changed ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]