Find different ifdef for Windows Phone

This commit is contained in:
twinaphex 2019-01-01 03:57:37 +01:00
parent ac32bff71a
commit 556bcc18e4
3 changed files with 1 additions and 15 deletions

View File

@ -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);

View File

@ -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<CoreWindow^, PointerEventArgs^>(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<Windows::UI::Core::BackRequestedEventArgs^>(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

View File

@ -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; }