[gnome-games/wip/exalm/psx-cleanup: 3/10] retro-gamepad: Remove present_analog_sticks
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/psx-cleanup: 3/10] retro-gamepad: Remove present_analog_sticks
- Date: Mon, 10 Feb 2020 11:55:11 +0000 (UTC)
commit b29dc995d13d68d1e5c2e9de5243ecee03d1fae0
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Feb 10 15:45:15 2020 +0500
retro-gamepad: Remove present_analog_sticks
It's unused.
src/retro/retro-gamepad.vala | 5 ++---
src/retro/retro-input-manager.vala | 8 +++-----
src/retro/retro-runner.vala | 3 +--
3 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/retro/retro-gamepad.vala b/src/retro/retro-gamepad.vala
index a046422d..c4206c9e 100644
--- a/src/retro/retro-gamepad.vala
+++ b/src/retro/retro-gamepad.vala
@@ -2,14 +2,13 @@
private class Games.RetroGamepad : Object, Retro.Controller {
public Manette.Device device { get; construct; }
- public bool present_analog_sticks { get; construct; }
private bool[] buttons;
private int16[] axes;
private uint16 rumble_effect[2];
- public RetroGamepad (Manette.Device device, bool present_analog_sticks) {
- Object (device: device, present_analog_sticks: present_analog_sticks);
+ public RetroGamepad (Manette.Device device) {
+ Object (device: device);
}
construct {
diff --git a/src/retro/retro-input-manager.vala b/src/retro/retro-input-manager.vala
index 221a6899..97f6047a 100644
--- a/src/retro/retro-input-manager.vala
+++ b/src/retro/retro-input-manager.vala
@@ -31,12 +31,10 @@ private class Games.RetroInputManager : Object {
private Manette.Device?[] devices;
private Retro.Controller?[] controllers;
private int core_view_joypad_port;
- private bool present_analog_sticks;
- public RetroInputManager (Retro.Core core, Retro.CoreView view, bool present_analog_sticks) {
+ public RetroInputManager (Retro.Core core, Retro.CoreView view) {
this.core = core;
this.view = view;
- this.present_analog_sticks = present_analog_sticks;
keyboard_mapping_manager = new KeyboardMappingManager ();
view.set_key_joypad_mapping (keyboard_mapping_manager.mapping);
@@ -52,7 +50,7 @@ private class Games.RetroInputManager : Object {
Manette.Device device = null;
while (iterator.next (out device)) {
var port = controllers.length;
- var retro_gamepad = new RetroGamepad (device, present_analog_sticks);
+ var retro_gamepad = new RetroGamepad (device);
devices += device;
controllers += retro_gamepad;
core.set_controller (port, retro_gamepad);
@@ -96,7 +94,7 @@ 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, present_analog_sticks);
+ var retro_gamepad = new RetroGamepad (device);
controllers[port] = retro_gamepad;
core.set_controller (port, retro_gamepad);
device.disconnected.connect (on_device_disconnected);
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 23b0800c..6629c532 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -270,8 +270,7 @@ public class Games.RetroRunner : Object, Runner {
private void instantiate_core (string core_save_directory_path) throws Error {
prepare_core (core_save_directory_path);
- var present_analog_sticks = input_capabilities == null ||
input_capabilities.get_allow_analog_gamepads ();
- input_manager = new RetroInputManager (core, view, present_analog_sticks);
+ input_manager = new RetroInputManager (core, view);
// Keep the internal values of input_mode in sync between RetroRunner and RetroInputManager
_input_mode = input_manager.input_mode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]