mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Merge pull request #8 from gtbass/master
Added rudimentary event handling
This commit is contained in:
commit
e1a13b1bbf
1 changed files with 9 additions and 5 deletions
|
@ -11,7 +11,7 @@
|
|||
#include <bx/uint32_t.h>
|
||||
#include <bx/thread.h>
|
||||
|
||||
#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)
|
||||
|
|
Loading…
Reference in a new issue