From 2e79b64353a8196eff7f527386491e422165fc2a Mon Sep 17 00:00:00 2001 From: Garett Bass Date: Sun, 3 Feb 2013 13:33:25 -0800 Subject: [PATCH] Added rudimentary event handling Added rudimentary event handling --- examples/common/entry_osx.mm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/common/entry_osx.mm b/examples/common/entry_osx.mm index 029da19b..ac590454 100755 --- a/examples/common/entry_osx.mm +++ b/examples/common/entry_osx.mm @@ -11,7 +11,7 @@ #include #include -#include "entry.h" +#include "entry_p.h" #include "dbg.h" #define DEFAULT_WIDTH 1280 @@ -207,12 +207,15 @@ namespace entry DispatchEvent(WaitEvent()); while (DispatchEvent(PeekEvent())); } + m_eventQueue.postExitEvent(); thread.shutdown(); return 0; } + EventQueue m_eventQueue; + bool m_exit; }; @@ -221,19 +224,20 @@ namespace entry const Event* poll() { - return NULL; + return s_ctx.m_eventQueue.poll(); } void release(const Event* _event) { + s_ctx.m_eventQueue.release(_event); } - void setWindowSize(uint32_t _width, uint32_t _height) - { + void setWindowSize(uint32_t _width, uint32_t _height) + { } void toggleWindowFrame() - { + { } void setMouseLock(bool _lock)