浏览代码

[rcore] Fix `IsMouseButtonUp()` for `PLATFORM_WEB` and `PLATFORM_DRM` (#3611)

* Fix IsMouseButtonUp() for PLATFORM_WEB

* Fix IsMouseButtonUp() for PLATFORM_DRM
pull/3615/head
ubkp 1年前
committed by GitHub
父节点
当前提交
a9ba51aa72
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. +1
    -0
      src/platforms/rcore_drm.c
  2. +1
    -0
      src/platforms/rcore_web.c

+ 1
- 0
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

+ 1
- 0
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

||||||
x
 
000:0
正在加载...
取消
保存