Fixed bug: touch input on WinPhone 8.0 was wrong, in some cases
authorDavid Ludwig <dludwig@pobox.com>
Fri, 09 May 2014 20:32:06 -0400
changeset 8756 d35c6e6ccbb4
parent 8755 f2fc45874b9c
child 8757 aeeeb47a5a77
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.
src/video/winrt/SDL_winrtpointerinput.cpp
--- a/src/video/winrt/SDL_winrtpointerinput.cpp	Fri May 09 20:16:21 2014 -0400
+++ b/src/video/winrt/SDL_winrtpointerinput.cpp	Fri May 09 20:32:06 2014 -0400
@@ -83,7 +83,7 @@
     // Compute coordinates normalized from 0..1.
     // If the coordinates need to be sized to the SDL window,
     // 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.Y = rawPosition.Y / nativeWindow->Bounds.Height;
 #else