Commit cdc0fdc5 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko Committed by Adrien Plazas

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.
parent c1e5ddc3
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment