summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry/entry_p.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry_p.h')
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_p.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry_p.h b/3rdparty/bgfx/examples/common/entry/entry_p.h
index 74d4756b5cb..d0ba73311c5 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_p.h
+++ b/3rdparty/bgfx/examples/common/entry/entry_p.h
@@ -17,8 +17,13 @@
# define ENTRY_CONFIG_USE_SDL 0
#endif // ENTRY_CONFIG_USE_SDL
-#if !ENTRY_CONFIG_USE_SDL && \
- !defined(ENTRY_CONFIG_USE_NATIVE)
+#ifndef ENTRY_CONFIG_USE_GLFW
+# define ENTRY_CONFIG_USE_GLFW 0
+#endif // ENTRY_CONFIG_USE_GLFW
+
+#if !defined(ENTRY_CONFIG_USE_NATIVE) \
+ && !ENTRY_CONFIG_USE_SDL \
+ && !ENTRY_CONFIG_USE_GLFW
# define ENTRY_CONFIG_USE_NATIVE 1
#else
# define ENTRY_CONFIG_USE_NATIVE 0
@@ -156,6 +161,14 @@ namespace entry
class EventQueue
{
public:
+ ~EventQueue()
+ {
+ for (const Event* ev = poll(); NULL != ev; ev = poll() )
+ {
+ release(ev);
+ }
+ }
+
void postAxisEvent(WindowHandle _handle, GamepadHandle _gamepad, GamepadAxis::Enum _axis, int32_t _value)
{
AxisEvent* ev = new AxisEvent(_handle);