From efb3cdca19df39c1219d8f85cf7aee4ee72bdca9 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 16 Sep 2013 22:27:30 -0400 Subject: [PATCH] WinRT: renamed SDL_winrt_main.cpp to indicate that it should only be used in non-XAML apps This can break builds of existing SDL/WinRT apps. To fix, remove the reference to SDL_winrt_main.cpp, then add a reference to the renamed file, SDL_winrt_main_NonXAML.cpp. If you get a build error about a missing .winmd file, enable the /ZW compiler flag for that one file (at minimum). --- .../tests/loopwave/loopwave_VS2012.vcxproj | 15 ++++++++++++++- .../tests/testthread/testthread_VS2012.vcxproj | 2 +- ..._winrt_main.cpp => SDL_winrt_main_NonXAML.cpp} | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) rename src/main/winrt/{SDL_winrt_main.cpp => SDL_winrt_main_NonXAML.cpp} (91%) diff --git a/VisualC-WinRT/tests/loopwave/loopwave_VS2012.vcxproj b/VisualC-WinRT/tests/loopwave/loopwave_VS2012.vcxproj index a74bb13e8..bd1750942 100644 --- a/VisualC-WinRT/tests/loopwave/loopwave_VS2012.vcxproj +++ b/VisualC-WinRT/tests/loopwave/loopwave_VS2012.vcxproj @@ -110,6 +110,9 @@ NotUsing NotUsing NotUsing + false + false + false @@ -118,6 +121,9 @@ NotUsing NotUsing NotUsing + false + false + false @@ -133,7 +139,14 @@ - + + true + true + true + true + true + true + false false diff --git a/VisualC-WinRT/tests/testthread/testthread_VS2012.vcxproj b/VisualC-WinRT/tests/testthread/testthread_VS2012.vcxproj index f9b5ef0aa..eb2558fa4 100644 --- a/VisualC-WinRT/tests/testthread/testthread_VS2012.vcxproj +++ b/VisualC-WinRT/tests/testthread/testthread_VS2012.vcxproj @@ -139,7 +139,7 @@ - + true true true diff --git a/src/main/winrt/SDL_winrt_main.cpp b/src/main/winrt/SDL_winrt_main_NonXAML.cpp similarity index 91% rename from src/main/winrt/SDL_winrt_main.cpp rename to src/main/winrt/SDL_winrt_main_NonXAML.cpp index 81ccfb310..a9956afb0 100644 --- a/src/main/winrt/SDL_winrt_main.cpp +++ b/src/main/winrt/SDL_winrt_main_NonXAML.cpp @@ -24,7 +24,7 @@ extern "C" int SDL_main(int, char **); #pragma comment(lib, "runtimeobject.lib") #endif -int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { if (FAILED(Windows::Foundation::Initialize(RO_INIT_MULTITHREADED))) { return 1; @@ -33,3 +33,4 @@ int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int) SDL_WinRT_RunApplication(SDL_main); return 0; } +