mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
Make the new event sink thread-safe (hopefully) and make small usability fixes
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <common/Variant.h>
|
||||
#include <keyboard/Keyboard.h>
|
||||
#include <mouse/Mouse.h>
|
||||
#include <thread/threads.h>
|
||||
|
||||
// STL
|
||||
#include <queue>
|
||||
@@ -66,6 +67,7 @@ namespace event
|
||||
static bool getConstant(love::keyboard::Keyboard::Key in, const char *& out);
|
||||
|
||||
protected:
|
||||
thread::Mutex mutex;
|
||||
std::queue<Message*> queue;
|
||||
static StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry buttonEntries[];
|
||||
static StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM> buttons;
|
||||
|
||||
Reference in New Issue
Block a user