diff options
| author | Ray <[email protected]> | 2020-02-19 12:44:57 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-02-19 12:44:57 +0100 |
| commit | 946a6cb2809883f9b287ac889beb835deca0f571 (patch) | |
| tree | bc5f551d27d9a30443656d2eb055e142d48505d9 /src/core.c | |
| parent | 7d789763d6be00cda49a8da352e3d8c0326b9845 (diff) | |
| download | raylib-946a6cb2809883f9b287ac889beb835deca0f571.tar.gz raylib-946a6cb2809883f9b287ac889beb835deca0f571.zip | |
Review mouse inputs
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -2479,8 +2479,8 @@ bool IsMouseButtonPressed(int button) if (IsGestureDetected(GESTURE_TAP)) pressed = true; #else // NOTE: On PLATFORM_DESKTOP and PLATFORM_WEB IsMouseButtonPressed() is equivalent to GESTURE_TAP - if (((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) && - (CORE.Input.Mouse.currentButtonState[button] == 1)) || IsGestureDetected(GESTURE_TAP)) pressed = true; + if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) && + (GetMouseButtonStatus(button) == 1)) pressed = true; #endif return pressed; @@ -2495,7 +2495,8 @@ bool IsMouseButtonDown(int button) if (IsGestureDetected(GESTURE_HOLD)) down = true; #else // NOTE: On PLATFORM_DESKTOP and PLATFORM_WEB IsMouseButtonDown() is equivalent to GESTURE_HOLD or GESTURE_DRAG - if ((GetMouseButtonStatus(button) == 1) || IsGestureDetected(GESTURE_HOLD) || IsGestureDetected(GESTURE_DRAG)) down = true; + if (GetMouseButtonStatus(button) == 1) down = true; + // || IsGestureDetected(GESTURE_HOLD) || IsGestureDetected(GESTURE_DRAG)) down = true; #endif return down; @@ -2508,7 +2509,7 @@ bool IsMouseButtonReleased(int button) #if !defined(PLATFORM_ANDROID) if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) && - (CORE.Input.Mouse.currentButtonState[button] == 0)) released = true; + (GetMouseButtonStatus(button) == 0)) released = true; #endif return released; |
