diff options
Diffstat (limited to 'source/Asura.Editor/Editor.cpp')
-rw-r--r-- | source/Asura.Editor/Editor.cpp | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/source/Asura.Editor/Editor.cpp b/source/Asura.Editor/Editor.cpp index 38e7c26..6ffd789 100644 --- a/source/Asura.Editor/Editor.cpp +++ b/source/Asura.Editor/Editor.cpp @@ -1,5 +1,51 @@ +#include "Editor.h" -int main(int argc, char *argv[]) +#include <vector> + +namespace_begin(AsuraEditor) + +void TranslateAndDispatch(MSG& msg) +{ + //if (g_BatchMode || !TranslateAccelerator(gMainWindow, GetMainMenuAccelerators(), &msg)) + //{ + // ResetGfxDeviceIfNeeded(); + // TranslateMessage(&msg); + // DispatchMessage(&msg); + //} +} + +int MainMessageLoop() { - -}
\ No newline at end of file + 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 |