From 556bcc18e41cd5694e62b575f16c0c4da88f7b36 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 1 Jan 2019 03:57:37 +0100 Subject: [PATCH] Find different ifdef for Windows Phone --- libretro-common/include/retro_timers.h | 2 +- uwp/uwp_main.cpp | 10 ---------- uwp/uwp_main.h | 4 ---- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/libretro-common/include/retro_timers.h b/libretro-common/include/retro_timers.h index 60bf221e36..d5526bc637 100644 --- a/libretro-common/include/retro_timers.h +++ b/libretro-common/include/retro_timers.h @@ -95,7 +95,7 @@ static INLINE void retro_sleep(unsigned msec) SDL_Delay(msec); #elif defined(_3DS) svcSleepThread(1000000 * (s64)msec); -#elif defined(__WINRT__) || (_MSC_VER && _MSC_VER <= 1800) +#elif defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP /* TODO/FIXME */ #elif defined(_WIN32) Sleep(msec); diff --git a/uwp/uwp_main.cpp b/uwp/uwp_main.cpp index 496a3750e9..674232172b 100644 --- a/uwp/uwp_main.cpp +++ b/uwp/uwp_main.cpp @@ -36,9 +36,7 @@ using namespace Windows::UI::Input; using namespace Windows::UI::ViewManagement; using namespace Windows::Devices::Input; using namespace Windows::System; -#if _MSC_VER >= 1800 using namespace Windows::System::Profile; -#endif using namespace Windows::Foundation; using namespace Windows::Graphics::Display; @@ -266,7 +264,6 @@ void App::SetWindow(CoreWindow^ window) window->PointerWheelChanged += ref new TypedEventHandler(this, &App::OnPointer); -#if _MSC_VER >= 1800 DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); currentDisplayInformation->DpiChanged += @@ -280,7 +277,6 @@ void App::SetWindow(CoreWindow^ window) Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->BackRequested += ref new EventHandler(this, &App::OnBackRequested); -#endif } // Initializes scene resources, or loads a previously saved app state. @@ -370,13 +366,11 @@ void App::OnResuming(Platform::Object^ sender, Platform::Object^ args) // does not occur if the app was previously terminated. } -#if _MSC_VER >= 1800 void App::OnBackRequested(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ args) { /* Prevent the B controller button on Xbox One from quitting the app */ args->Handled = true; } -#endif // Window event handlers. @@ -452,7 +446,6 @@ void App::OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args) // DisplayInformation event handlers. -#if _MSC_VER >= 1800 void App::OnDpiChanged(DisplayInformation^ sender, Object^ args) { m_windowResized = true; @@ -467,7 +460,6 @@ void App::OnDisplayContentsInvalidated(DisplayInformation^ sender, Object^ args) { // Probably can be ignored? } -#endif // Taken from DirectX UWP samples - on Xbox, everything is scaled 200% so getting the DPI calculation correct is crucial static inline float ConvertDipsToPixels(float dips, float dpi) @@ -488,7 +480,6 @@ extern "C" { { if (App::GetInstance()->IsInitialized()) { -#if _MSC_VER >= 1800 if (fullscreen != ApplicationView::GetForCurrentView()->IsFullScreenMode) { if (fullscreen) @@ -496,7 +487,6 @@ extern "C" { else ApplicationView::GetForCurrentView()->ExitFullScreenMode(); } -#endif ApplicationView::GetForCurrentView()->TryResizeView(Size(width, height)); } else diff --git a/uwp/uwp_main.h b/uwp/uwp_main.h index 8f1f123561..623d922161 100644 --- a/uwp/uwp_main.h +++ b/uwp/uwp_main.h @@ -38,9 +38,7 @@ namespace RetroArchUWP void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args); void OnResuming(Platform::Object^ sender, Platform::Object^ args); -#if _MSC_VER >= 1800 void OnBackRequested(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ args); -#endif // Window event handlers. void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args); @@ -51,11 +49,9 @@ namespace RetroArchUWP void OnPointer(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); // DisplayInformation event handlers. -#if _MSC_VER >= 1800 void OnDpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); void OnDisplayContentsInvalidated(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); -#endif public: bool IsInitialized() { return m_initialized; }