From 4c597919033a9a3313698a1e687a7afbc0924216 Mon Sep 17 00:00:00 2001 From: MichaelFiber Date: Mon, 18 Sep 2023 16:19:52 -0400 Subject: [PATCH] Move SetGamepadMappings out of rcore --- src/rcore.c | 12 ------------ src/rcore_android.c | 8 ++++++-- src/rcore_desktop.c | 8 ++++++-- src/rcore_drm.c | 8 ++++++-- src/rcore_web.c | 8 ++++++-- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 0f17bbb14..294b90b72 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2022,18 +2022,6 @@ int GetGamepadButtonPressed(void) return CORE.Input.Gamepad.lastButtonPressed; } -// Set internal gamepad mappings -int SetGamepadMappings(const char *mappings) -{ - int result = 0; - -#if defined(PLATFORM_DESKTOP) - result = glfwUpdateGamepadMappings(mappings); -#endif - - return result; -} - // Check if a mouse button has been pressed once bool IsMouseButtonPressed(int button) { diff --git a/src/rcore_android.c b/src/rcore_android.c index 6950f53f2..a6bceec91 100644 --- a/src/rcore_android.c +++ b/src/rcore_android.c @@ -1634,16 +1634,20 @@ const char *GetGamepadName(int gamepad) return NULL; } - // Get selected monitor physical width in millimetres int GetMonitorPhysicalWidth(int monitor) { return 0; } - // Get gamepad axis count int GetGamepadAxisCount(int gamepad) { return CORE.Input.Gamepad.axisCount; } + +// Set internal gamepad mappings +int SetGamepadMappings(const char *mappings) +{ + return 0; +} diff --git a/src/rcore_desktop.c b/src/rcore_desktop.c index 61c8f05f8..a50ec0cd1 100644 --- a/src/rcore_desktop.c +++ b/src/rcore_desktop.c @@ -1508,7 +1508,6 @@ const char *GetGamepadName(int gamepad) return name; } - // Get selected monitor physical width in millimetres int GetMonitorPhysicalWidth(int monitor) { @@ -1525,9 +1524,14 @@ int GetMonitorPhysicalWidth(int monitor) return 0; } - // Get gamepad axis count int GetGamepadAxisCount(int gamepad) { return CORE.Input.Gamepad.axisCount; } + +// Set internal gamepad mappings +int SetGamepadMappings(const char *mappings) +{ + return glfwUpdateGamepadMappings(mappings); +} diff --git a/src/rcore_drm.c b/src/rcore_drm.c index 40d05dae0..6e2d79452 100644 --- a/src/rcore_drm.c +++ b/src/rcore_drm.c @@ -956,14 +956,12 @@ const char *GetGamepadName(int gamepad) return name; } - // Get selected monitor physical width in millimetres int GetMonitorPhysicalWidth(int monitor) { return 0; } - // Get gamepad axis count int GetGamepadAxisCount(int gamepad) { @@ -972,3 +970,9 @@ int GetGamepadAxisCount(int gamepad) CORE.Input.Gamepad.axisCount = axisCount; return CORE.Input.Gamepad.axisCount; } + +// Set internal gamepad mappings +int SetGamepadMappings(const char *mappings) +{ + return 0; +} diff --git a/src/rcore_web.c b/src/rcore_web.c index 0df95548f..2bc7b9343 100644 --- a/src/rcore_web.c +++ b/src/rcore_web.c @@ -1556,16 +1556,20 @@ const char *GetGamepadName(int gamepad) return name; } - // Get selected monitor physical width in millimetres int GetMonitorPhysicalWidth(int monitor) { return 0; } - // Get gamepad axis count int GetGamepadAxisCount(int gamepad) { return CORE.Input.Gamepad.axisCount; } + +// Set internal gamepad mappings +int SetGamepadMappings(const char *mappings) +{ + return 0; +}