Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
WinRT: pseudo-implemented SDLmain for WinRT. It has to be compiled di…
Browse files Browse the repository at this point in the history
…rectly into apps, for now.
  • Loading branch information
DavidLudwig committed Nov 23, 2012
1 parent 264534e commit d6c3767
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/windowsrt/SDL_winrt_main.cpp
@@ -0,0 +1,14 @@

//#include "pch.h"

// The app's C-style main will be passed into SDL.dll as a function
// pointer, and called at the appropriate time.
typedef int (*SDLmain_MainFunction)(int, char **);
extern __declspec(dllimport) int SDL_WinRT_RunApplication(SDLmain_MainFunction mainFunction);
extern "C" int SDL_main(int, char **);

[Platform::MTAThread]
int main(Platform::Array<Platform::String^>^)
{
return SDL_WinRT_RunApplication(SDL_main);
}

0 comments on commit d6c3767

Please sign in to comment.