[retro-gtk] core-view-controller: Return correct capabilities
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] core-view-controller: Return correct capabilities
- Date: Thu, 31 May 2018 07:35:41 +0000 (UTC)
commit cdc0fdc5c017955e85aaa3463a30dc855c50b798
Author: Exalm <exalm7659 gmail com>
Date: Wed May 9 21:39:16 2018 +0500
core-view-controller: Return correct capabilities
Only return the capability matching the controller device type. This
allows to avoid the situation where a controller always returns 0 in
retro_controller_get_input_state() for certain device types.
retro-gtk/retro-core-view-controller.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/retro-gtk/retro-core-view-controller.c b/retro-gtk/retro-core-view-controller.c
index 4abd3bd..f280467 100644
--- a/retro-gtk/retro-core-view-controller.c
+++ b/retro-gtk/retro-core-view-controller.c
@@ -64,7 +64,7 @@ retro_core_view_controller_get_capabilities (RetroController *base)
{
RetroCoreViewController *self = RETRO_CORE_VIEW_CONTROLLER (base);
gpointer view;
- guint64 result;
+ guint64 capabilities;
g_return_val_if_fail (self != NULL, 0);
@@ -73,11 +73,11 @@ retro_core_view_controller_get_capabilities (RetroController *base)
if (view == NULL)
return 0;
- result = retro_core_view_get_controller_capabilities (RETRO_CORE_VIEW (view));
+ capabilities = retro_core_view_get_controller_capabilities (RETRO_CORE_VIEW (view));
g_object_unref (G_OBJECT (view));
- return result;
+ return capabilities & (1 << self->controller_type);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]