[retro-gtk] demo: Set default controllers
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] demo: Set default controllers
- Date: Sun, 29 Oct 2017 21:38:17 +0000 (UTC)
commit 8eee0c705180f14cee9d791dd385d1d116981b99
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun Oct 29 14:42:25 2017 +0100
demo: Set default controllers
demos/retro-demo.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/demos/retro-demo.c b/demos/retro-demo.c
index eca4ea5..2254885 100644
--- a/demos/retro-demo.c
+++ b/demos/retro-demo.c
@@ -92,9 +92,20 @@ retro_demo_activate (GApplication *application)
retro_core_view_set_core (self->view, self->core);
retro_core_set_keyboard (self->core, GTK_WIDGET (self->view));
+
+ controller = retro_core_view_as_controller (self->view,
+ RETRO_CONTROLLER_TYPE_JOYPAD);
+ retro_core_set_default_controller (self->core, controller);
+ g_object_unref (controller);
+
+ controller = retro_core_view_as_controller (self->view,
+ RETRO_CONTROLLER_TYPE_MOUSE);
+ retro_core_set_default_controller (self->core, controller);
+ g_object_unref (controller);
+
controller = retro_core_view_as_controller (self->view,
RETRO_CONTROLLER_TYPE_POINTER);
- retro_core_set_controller (self->core, 0, controller);
+ retro_core_set_default_controller (self->core, controller);
g_object_unref (controller);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]