WinRT: pseudo-implemented SDLmain for WinRT. It has to be compiled directly into apps, for now.
authorDavid Ludwig <dludwig@pobox.com>
Thu, 22 Nov 2012 22:36:34 -0500
changeset 8355f73480bf3e55
parent 8354 c086e9e73916
child 8356 4d85eba58f0a
WinRT: pseudo-implemented SDLmain for WinRT. It has to be compiled directly into apps, for now.
src/main/windowsrt/SDL_winrt_main.cpp
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/main/windowsrt/SDL_winrt_main.cpp	Thu Nov 22 22:36:34 2012 -0500
     1.3 @@ -0,0 +1,14 @@
     1.4 +
     1.5 +//#include "pch.h"
     1.6 +
     1.7 +// The app's C-style main will be passed into SDL.dll as a function
     1.8 +// pointer, and called at the appropriate time.
     1.9 +typedef int (*SDLmain_MainFunction)(int, char **);
    1.10 +extern __declspec(dllimport) int SDL_WinRT_RunApplication(SDLmain_MainFunction mainFunction);
    1.11 +extern "C" int SDL_main(int, char **);
    1.12 +
    1.13 +[Platform::MTAThread]
    1.14 +int main(Platform::Array<Platform::String^>^)
    1.15 +{
    1.16 +    return SDL_WinRT_RunApplication(SDL_main);
    1.17 +}