[gnome-games/wip/aplazas/options: 2/5] retro-runner: Don't have null InputCapabilities
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/aplazas/options: 2/5] retro-runner: Don't have null InputCapabilities
- Date: Fri, 24 Nov 2017 11:13:49 +0000 (UTC)
commit fee85a3d7dbe9c64cb32c15f853170787824b05d
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Nov 24 09:29:51 2017 +0100
retro-runner: Don't have null InputCapabilities
This simplifies defining the default input capabilities and avoid using
a potentially null value.
src/retro/retro-runner.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index cbdca3b..9a30a31 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -81,7 +81,7 @@ public class Games.RetroRunner : Object, Runner {
this.uid = uid;
this.core_source = core_source;
- this.input_capabilities = null;
+ this.input_capabilities = new InputCapabilities ();
this.game_title = game_title;
}
@@ -109,7 +109,7 @@ public class Games.RetroRunner : Object, Runner {
this.core_source = null;
this._media_set = new MediaSet ();
this.uid = uid;
- this.input_capabilities = null;
+ this.input_capabilities = new InputCapabilities ();
this.game_title = game_title;
}
@@ -192,7 +192,7 @@ public class Games.RetroRunner : Object, Runner {
prepare_core ();
- var present_analog_sticks = input_capabilities == null ||
input_capabilities.get_allow_analog_gamepads ();
+ var present_analog_sticks = input_capabilities.get_allow_analog_gamepads ();
input_manager = new RetroInputManager (core, view, present_analog_sticks);
core.shutdown.connect (on_shutdown);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]