diff options
Diffstat (limited to 'Source/Asura.Editor/Main.cpp')
-rw-r--r-- | Source/Asura.Editor/Main.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/Asura.Editor/Main.cpp b/Source/Asura.Editor/Main.cpp new file mode 100644 index 0000000..87207f0 --- /dev/null +++ b/Source/Asura.Editor/Main.cpp @@ -0,0 +1,33 @@ +#include <windows.h> + + + +int main(int argn, char* args[]) +{ + bool gotMsg; + MSG msg; + msg.message = WM_NULL; + PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE); + HANDLE hevent = (HANDLE)CreateEvent(NULL, FALSE, FALSE, NULL); + while (WM_QUIT != msg.message) + { + // Use PeekMessage() if the app is active, so we can use idle time to + // render the scene. Else, use GetMessage() to avoid eating CPU time. + //bool dontWaitForMessages = gAppActive || (!gAlreadyClosing && GetPlayerRunInBackground()) || (kPlayerPausing == GetPlayerPause()); + bool dontWaitForMessages = false; + if (dontWaitForMessages) + gotMsg = (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE) != 0); + else + gotMsg = (GetMessage(&msg, NULL, 0U, 0U) != 0); + + if (gotMsg) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + else { + // perform main loop + //PerformMainLoop(); + } + + } +}
\ No newline at end of file |