mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed bug: touch input on WinPhone 8.0 was wrong, in some cases
When a Windows Phone 8.0 app was rotated to anything but Portrait mode, touch input coordinates, as well as virtual mouse coordinates, were usually getting reported as coming from the wrong part of the screen.
This commit is contained in:
parent
0a879d63bd
commit
d4f1d2257e
@ -83,7 +83,7 @@ WINRT_TransformCursorPosition(SDL_Window * window,
|
|||||||
// Compute coordinates normalized from 0..1.
|
// Compute coordinates normalized from 0..1.
|
||||||
// If the coordinates need to be sized to the SDL window,
|
// If the coordinates need to be sized to the SDL window,
|
||||||
// we'll do that after.
|
// we'll do that after.
|
||||||
#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (NTDDI_VERSION >= NTDDI_WINBLUE)
|
#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (NTDDI_VERSION > NTDDI_WIN8)
|
||||||
outputPosition.X = rawPosition.X / nativeWindow->Bounds.Width;
|
outputPosition.X = rawPosition.X / nativeWindow->Bounds.Width;
|
||||||
outputPosition.Y = rawPosition.Y / nativeWindow->Bounds.Height;
|
outputPosition.Y = rawPosition.Y / nativeWindow->Bounds.Height;
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user