Complement note and optimization

This commit is contained in:
ubkp 2023-12-08 01:18:44 -03:00
parent 3387a856d7
commit cd04bcdee1

View File

@ -1253,8 +1253,7 @@ void PollInputEvents(void)
gestureEvent.pointCount = 1; gestureEvent.pointCount = 1;
// Register touch points position, only one point registered // Register touch points position, only one point registered
if (realTouch) gestureEvent.position[0] = CORE.Input.Touch.position[0]; if (touchAction == 2 || realTouch) gestureEvent.position[0] = CORE.Input.Touch.position[0];
else if (touchAction == 2) gestureEvent.position[0] = CORE.Input.Touch.position[0];
else gestureEvent.position[0] = GetMousePosition(); else gestureEvent.position[0] = GetMousePosition();
// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height // Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
@ -1417,7 +1416,7 @@ int InitPlatform(void)
// Disable mouse events being interpreted as touch events // Disable mouse events being interpreted as touch events
// NOTE: This is wanted because there are SDL_FINGER* events available which provide unique data // 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_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
SDL_EventState(SDL_DROPFILE, SDL_ENABLE); SDL_EventState(SDL_DROPFILE, SDL_ENABLE);