diff --git a/Source/Project64/User Interface.h b/Source/Project64/User Interface.h index f430de71d..713f18a9d 100644 --- a/Source/Project64/User Interface.h +++ b/Source/Project64/User Interface.h @@ -44,8 +44,14 @@ struct WINDOWS_PAINTSTRUCT { class CN64System; +#define WINDOWS_UI +// Remove this to test compilation outside of the Windows ATL environment. + +#ifdef WINDOWS_UI #include +#endif #include + #include ".\\User Interface\\Rom Browser.h" #include ".\\User Interface\\Gui Class.h" #include ".\\User Interface\\Menu Class.h" @@ -54,4 +60,6 @@ class CN64System; #include ".\\User Interface\\Notification Class.h" #include ".\\User Interface\\Frame Per Second Class.h" #include ".\\User Interface\\resource.h" +#ifdef WINDOWS_UI #include ".\\User Interface\\Settings Config.h" +#endif diff --git a/Source/Project64/main.cpp b/Source/Project64/main.cpp index 775184ab0..60cb62acc 100644 --- a/Source/Project64/main.cpp +++ b/Source/Project64/main.cpp @@ -178,7 +178,20 @@ const char * AppName ( void ) return Name.c_str(); } -int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszArgs*/, int /*nWinMode*/) +#ifndef WINDOWS_UI +int main(int argc, char* argv[]) +{ +#error Cross-platform [graphical?] interface has not yet been implemented. +// Remove this #error to compile, but linking will fail with about 10 errors. + + while (argc >= 0) + { + puts(argv[--argc]); + } + return 0; +} +#else +int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszArgs*/, int /*nWinMode*/) { FixDirectories(); @@ -280,3 +293,4 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR / CloseTrace(); return true; } +#endif