summaryrefslogtreecommitdiff
path: root/source/Asura.Editor/Main.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-06 09:14:11 +0800
committerchai <chaifix@163.com>2019-08-06 09:14:11 +0800
commit9686368e58e25cbd6dc37d686bdd2be3f80486d6 (patch)
treeb4887373c33f29a0e837420042a8c84d98bdba49 /source/Asura.Editor/Main.cpp
parent7638df1ed1f0f314d78bd42e0aba084ba14ade0a (diff)
*misc
Diffstat (limited to 'source/Asura.Editor/Main.cpp')
-rw-r--r--source/Asura.Editor/Main.cpp51
1 files changed, 27 insertions, 24 deletions
diff --git a/source/Asura.Editor/Main.cpp b/source/Asura.Editor/Main.cpp
index 207474b..87207f0 100644
--- a/source/Asura.Editor/Main.cpp
+++ b/source/Asura.Editor/Main.cpp
@@ -1,30 +1,33 @@
-/**
- * Copyright (c) 2018-2019 AsuraEngine Team
- *
- * This software is provided 'as-is', without any express or implied
- * warranty. In no event will the authors be held liable for any damages
- * arising from the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software m_ust not be m_isrepresented; you m_ust not
- * claim that you wrote the original software. If you use this software
- * in a product, an acknowledgment in the product documentation would be
- * appreciated but is not required.
- * 2. Altered source versions m_ust be plainly m_arked as such, and m_ust not be
- * m_isrepresented as being the original software.
- * 3. This notice m_ay not be removed or altered from any source distribution.
- **/
+#include <windows.h>
-///
-/// ༭ĽͨdirectUIʵ֣Ⱦasura-libϣ¼Ӧͨwin32APIʵ֡
-///
-int main(int argn, char* args[])
-{
+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