mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 13:37:56 +00:00
WinRT: preliminary support for building against the Windows Phone 8.1 SDK
This is a step towards supporting "Universal" Windows apps, when building for Windows Phone. SDL can now build against the Windows Phone 8.1 SDK, and apps linked to it can run, however further work and testing is required as some previously Phone-only code appears to no longer be applicable for Windows Phone 8.1. The Windows 8.1 code paths does seem to be preferable, but should probably be tested and updated on a finer-grained basis. If in doubt, use the Windows Phone 8.0 projects for now, as located in VisualC-WinRT/WinPhone80_VS2012/ TODO: - look at any Windows Phone specific code paths in SDL, and see if Phone 8.1 should use the Windows Phone code path(s), or the Windows 8.x or 8.1 paths
This commit is contained in:
@@ -83,7 +83,7 @@ WINRT_TransformCursorPosition(SDL_Window * window,
|
||||
// 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
|
||||
#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (NTDDI_VERSION >= NTDDI_WINBLUE)
|
||||
outputPosition.X = rawPosition.X / nativeWindow->Bounds.Width;
|
||||
outputPosition.Y = rawPosition.Y / nativeWindow->Bounds.Height;
|
||||
#else
|
||||
|
||||
@@ -215,7 +215,7 @@ WINRT_CalcDisplayModeUsingNativeWindow(SDL_DisplayMode * mode)
|
||||
// orientation changes. In order to compensate for this behavior,
|
||||
// on Windows Phone, the mode's width and height will be swapped when
|
||||
// the device is in a landscape (non-portrait) mode.
|
||||
switch (DisplayProperties::CurrentOrientation) {
|
||||
switch (driverdata->currentOrientation) {
|
||||
case DisplayOrientations::Landscape:
|
||||
case DisplayOrientations::LandscapeFlipped:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user