diff options
Diffstat (limited to 'src/osd/windows/main.cpp')
-rw-r--r-- | src/osd/windows/main.cpp | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/osd/windows/main.cpp b/src/osd/windows/main.cpp index ccfddb27a0d..6e7717349bb 100644 --- a/src/osd/windows/main.cpp +++ b/src/osd/windows/main.cpp @@ -7,28 +7,24 @@ //============================================================ // standard windows headers +#ifdef OSD_SDL +#define _WIN32_WINNT 0x0501 +#endif #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <tchar.h> #include <stdlib.h> -// MAMEOS headers #include "strconv.h" -extern int utf8_main(int argc, char *argv[]); - - +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +extern int utf8_main(int argc, char *argv[]); //============================================================ // main //============================================================ -// undo the command-line #define that maps main to utf8_main in all other cases -#ifndef WINUI -#undef main -#undef wmain -#endif - +#ifdef UNICODE extern "C" int _tmain(int argc, TCHAR **argv) { int i, rc; @@ -55,3 +51,19 @@ extern "C" int _tmain(int argc, TCHAR **argv) return rc; } +#endif + +#else + +#include "winmain.h" + +// The main function is only used to initialize our IFrameworkView class. +[Platform::MTAThread] +int main(Platform::Array<Platform::String^>^) +{ + auto app_source = ref new MameViewSource(); + Windows::ApplicationModel::Core::CoreApplication::Run(app_source); + return 0; +} + +#endif |