diff options
| author | ubkp <[email protected]> | 2023-12-07 15:53:27 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-07 19:53:27 +0100 |
| commit | a9ba51aa72cfc9c75c2230726a49e1d9065b3c01 (patch) | |
| tree | 00110e8b2b4881692b3fad55b56083b0bbc90d51 /src/platforms | |
| parent | ab9bddb3bd3b60c07f5c6583569d224ed9d31e72 (diff) | |
| download | raylib-a9ba51aa72cfc9c75c2230726a49e1d9065b3c01.tar.gz raylib-a9ba51aa72cfc9c75c2230726a49e1d9065b3c01.zip | |
[rcore] Fix `IsMouseButtonUp()` for `PLATFORM_WEB` and `PLATFORM_DRM` (#3611)
* Fix IsMouseButtonUp() for PLATFORM_WEB
* Fix IsMouseButtonUp() for PLATFORM_DRM
Diffstat (limited to 'src/platforms')
| -rw-r--r-- | src/platforms/rcore_drm.c | 1 | ||||
| -rw-r--r-- | src/platforms/rcore_web.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index f51953a6..e9493d72 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -571,6 +571,7 @@ void PollInputEvents(void) { CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i]; CORE.Input.Mouse.currentButtonState[i] = platform.currentButtonStateEvdev[i]; + CORE.Input.Touch.currentTouchState[i] = platform.currentButtonStateEvdev[i]; } // Register gamepads buttons events diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index 4353f795..ae210853 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -1093,6 +1093,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int // WARNING: GLFW could only return GLFW_PRESS (1) or GLFW_RELEASE (0) for now, // but future releases may add more actions (i.e. GLFW_REPEAT) CORE.Input.Mouse.currentButtonState[button] = action; + CORE.Input.Touch.currentTouchState[button] = action; #if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES) // Process mouse events as touches to be able to use mouse-gestures |
