From 4d07da8973bb0e3091d121e79eaa27ee5d1aa636 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 14 Oct 2023 14:08:32 -0400 Subject: [PATCH] Clean up after merge --- src/rcore.c | 2 +- src/rcore_drm.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index e6015b33f..f94731f90 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2168,7 +2168,7 @@ int GetGamepadButtonPressed(void) // Get gamepad axis count int GetGamepadAxisCount(int gamepad) { - return CORE.Input.Gamepad.axisCount; + return CORE.Input.Gamepad.axisCount[gamepad]; } // Get axis movement vector for a gamepad diff --git a/src/rcore_drm.c b/src/rcore_drm.c index cce9727df..82d95b22f 100644 --- a/src/rcore_drm.c +++ b/src/rcore_drm.c @@ -174,7 +174,7 @@ static void PollKeyboardEvents(void); // Process evdev keyboar static void *EventThread(void *arg); // Input device events reading thread //static void InitGamepad(void); // Initialize raw gamepad input -static void *GamepadThread(void *arg); // Mouse reading thread +//static void *GamepadThread(void *arg); // Mouse reading thread static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode); // Search matching DRM mode in connector's mode list static int FindExactConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced); // Search exactly matching DRM connector mode in connector's list @@ -1074,7 +1074,8 @@ static int InitPlatform(void) // Initialize raw input system InitEvdevInput(); // Evdev inputs initialization - InitGamepad(); // Gamepad init + InitDrmInput(); + //InitGamepad(); // Gamepad init InitKeyboard(); // Keyboard init (stdin) return 0; @@ -1417,7 +1418,7 @@ static void InitDrmJoystick(int index, const char *path) { TraceLog(LOG_INFO, TextFormat("InitDrmJoystick - %s", path)); - int result = (platform.gamepadStreamFd[index] = open(path, O_RDONLY | O_NONBLOCK)); + platform.gamepadStreamFd[index] = open(path, O_RDONLY | O_NONBLOCK); // Get the name of the device. ioctl(platform.gamepadStreamFd[index], EVIOCGNAME(64), &CORE.Input.Gamepad.name[index]);