Skip to content

Commit

Permalink
Complement note and optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ubkp committed Dec 8, 2023
1 parent 3387a85 commit cd04bcd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/platforms/rcore_desktop_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,8 +1253,7 @@ void PollInputEvents(void)
gestureEvent.pointCount = 1;

// Register touch points position, only one point registered
if (realTouch) gestureEvent.position[0] = CORE.Input.Touch.position[0];
else if (touchAction == 2) gestureEvent.position[0] = CORE.Input.Touch.position[0];
if (touchAction == 2 || realTouch) gestureEvent.position[0] = CORE.Input.Touch.position[0];
else gestureEvent.position[0] = GetMousePosition();

// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
Expand Down Expand Up @@ -1417,7 +1416,7 @@ int InitPlatform(void)

// Disable mouse events being interpreted as touch events
// NOTE: This is wanted because there are SDL_FINGER* events available which provide unique data
// Due to the way rgestures.h is currently implemented, setting this doesn't break SUPPORT_MOUSE_GESTURES
// Due to the way PollInputEvents() and rgestures.h are currently implemented, setting this won't break SUPPORT_MOUSE_GESTURES
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");

SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
Expand Down

0 comments on commit cd04bcd

Please sign in to comment.