소스 검색

Review mouse inputs

pull/1113/head
Ray 5 년 전
부모
커밋
946a6cb280
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. +5
    -4
      src/core.c

+ 5
- 4
src/core.c 파일 보기

@ -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 ((p">(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;

불러오는 중...
취소
저장