RPI: Include index check for RPI in GetTouchPosition()
This commit is contained in:
parent
5ac300b760
commit
bda5e3c67e
|
|
@ -2648,7 +2648,7 @@ Vector2 GetTouchPosition(int index)
|
||||||
{
|
{
|
||||||
Vector2 position = { -1.0f, -1.0f };
|
Vector2 position = { -1.0f, -1.0f };
|
||||||
|
|
||||||
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
|
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB) || defined(PLATFORM_RPI)
|
||||||
if (index < MAX_TOUCH_POINTS) position = CORE.Input.Touch.position[index];
|
if (index < MAX_TOUCH_POINTS) position = CORE.Input.Touch.position[index];
|
||||||
else TRACELOG(LOG_WARNING, "Required touch point out of range (Max touch points: %i)", MAX_TOUCH_POINTS);
|
else TRACELOG(LOG_WARNING, "Required touch point out of range (Max touch points: %i)", MAX_TOUCH_POINTS);
|
||||||
|
|
||||||
|
|
@ -2664,11 +2664,7 @@ Vector2 GetTouchPosition(int index)
|
||||||
position.y = position.y*((float)CORE.Window.render.height/(float)CORE.Window.display.height) - CORE.Window.renderOffset.y/2;
|
position.y = position.y*((float)CORE.Window.render.height/(float)CORE.Window.display.height) - CORE.Window.renderOffset.y/2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#elif defined(PLATFORM_DESKTOP)
|
||||||
#if defined(PLATFORM_RPI)
|
|
||||||
position = CORE.Input.Touch.position[index];
|
|
||||||
#endif
|
|
||||||
#if defined(PLATFORM_DESKTOP)
|
|
||||||
// TODO: GLFW is not supporting multi-touch input just yet
|
// TODO: GLFW is not supporting multi-touch input just yet
|
||||||
// https://www.codeproject.com/Articles/668404/Programming-for-Multi-Touch
|
// https://www.codeproject.com/Articles/668404/Programming-for-Multi-Touch
|
||||||
// https://docs.microsoft.com/en-us/windows/win32/wintouch/getting-started-with-multi-touch-messages
|
// https://docs.microsoft.com/en-us/windows/win32/wintouch/getting-started-with-multi-touch-messages
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user