mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
KINGDOM: Fix readMouse clobbering quit events
This commit is contained in:
parent
25ed22d192
commit
9310bd99e4
@ -974,18 +974,10 @@ void KingdomGame::eraseCursor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void KingdomGame::readMouse() {
|
void KingdomGame::readMouse() {
|
||||||
_mouseButton = 0;
|
Common::EventManager *eventManager = g_system->getEventManager();
|
||||||
|
|
||||||
Common::Event event;
|
_mouseButton = eventManager->getButtonState();
|
||||||
g_system->getEventManager()->pollEvent(event);
|
_cursorPos = eventManager->getMousePos();
|
||||||
if (event.type == Common::EVENT_MOUSEMOVE)
|
|
||||||
_cursorPos = event.mouse;
|
|
||||||
if (event.type == Common::EVENT_LBUTTONUP)
|
|
||||||
_mouseButton |= 1;
|
|
||||||
if (event.type == Common::EVENT_RBUTTONUP)
|
|
||||||
_mouseButton |= 2;
|
|
||||||
|
|
||||||
g_system->getEventManager()->pushEvent(event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KingdomGame::getUserInput() {
|
void KingdomGame::getUserInput() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user