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 8756d35c6e6ccbb4
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
     1.1 --- a/src/video/winrt/SDL_winrtpointerinput.cpp	Fri May 09 20:16:21 2014 -0400
     1.2 +++ b/src/video/winrt/SDL_winrtpointerinput.cpp	Fri May 09 20:32:06 2014 -0400
     1.3 @@ -83,7 +83,7 @@
     1.4      // Compute coordinates normalized from 0..1.
     1.5      // If the coordinates need to be sized to the SDL window,
     1.6      // we'll do that after.
     1.7 -#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (NTDDI_VERSION >= NTDDI_WINBLUE)
     1.8 +#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (NTDDI_VERSION > NTDDI_WIN8)
     1.9      outputPosition.X = rawPosition.X / nativeWindow->Bounds.Width;
    1.10      outputPosition.Y = rawPosition.Y / nativeWindow->Bounds.Height;
    1.11  #else