diff options
Diffstat (limited to 'Source/Asura.Editor/Editor.cpp')
-rw-r--r-- | Source/Asura.Editor/Editor.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Source/Asura.Editor/Editor.cpp b/Source/Asura.Editor/Editor.cpp new file mode 100644 index 0000000..6ffd789 --- /dev/null +++ b/Source/Asura.Editor/Editor.cpp @@ -0,0 +1,51 @@ +#include "Editor.h" + +#include <vector> + +namespace_begin(AsuraEditor) + +void TranslateAndDispatch(MSG& msg) +{ + //if (g_BatchMode || !TranslateAccelerator(gMainWindow, GetMainMenuAccelerators(), &msg)) + //{ + // ResetGfxDeviceIfNeeded(); + // TranslateMessage(&msg); + // DispatchMessage(&msg); + //} +} + +int MainMessageLoop() +{ + MSG msg, lastMsg; + msg.message = WM_NULL; + std::vector<MSG> messages; + PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE); + bool isQuit = msg.message == WM_QUIT; + while (!isQuit) + { + messages.clear(); + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + if (msg.message == WM_INPUT || msg.message == WM_PAINT) + { + + } + + if (msg.message == WM_QUIT) + isQuit = true; + + messages.push_back(msg); + + if (messages.size() > 100) + break; + } + + for (unsigned i = 0; i < messages.size(); ++i) + { + msg = messages[i]; + } + } +} + + +namespace_end
\ No newline at end of file |