From 089920377f0399dddf2f40b6687dd41276cd75d5 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Sat, 11 Aug 2012 02:42:37 +0200 Subject: WINTERMUTE: Make RTL skip any "are you sure?"-dialogs. The user has already quite intentionally opened the GMM and clicked "return to launcher" additionally the GMM can be launched at any time, but the "are you sure"-message can't always be shown, for instance if the user is already in some in-game menu, or a video is playing. --- engines/wintermute/platform_osystem.cpp | 46 ++++++++------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp index b2a0b976d4..a23e606931 100644 --- a/engines/wintermute/platform_osystem.cpp +++ b/engines/wintermute/platform_osystem.cpp @@ -49,7 +49,9 @@ void BasePlatform::handleEvent(Common::Event *event) { case Common::EVENT_LBUTTONDOWN: if (_gameRef) { - if (_gameRef->isLeftDoubleClick()) _gameRef->onMouseLeftDblClick(); + if (_gameRef->isLeftDoubleClick()) { + _gameRef->onMouseLeftDblClick(); + } else _gameRef->onMouseLeftDown(); } break; @@ -81,46 +83,20 @@ void BasePlatform::handleEvent(Common::Event *event) { case Common::EVENT_WHEELDOWN: if (_gameRef) _gameRef->handleMouseWheel(event->mouse.y); break; -//TODO: Handle MouseWheel - /* case SDL_MOUSEWHEEL: - if (_gameRef) _gameRef->handleMouseWheel(event->wheel.y); - break; - - case SDL_KEYDOWN: - case SDL_TEXTINPUT: - if (_gameRef) _gameRef->handleKeypress(event); - break; - - case SDL_WINDOWEVENT: - switch (event->window.event) { - case SDL_WINDOWEVENT_FOCUS_GAINED: - case SDL_WINDOWEVENT_RESTORED: - if (_gameRef) _gameRef->OnActivate(true, true); - SDL_ShowCursor(SDL_DISABLE); - break; - case SDL_WINDOWEVENT_FOCUS_LOST: - case SDL_WINDOWEVENT_MINIMIZED: - if (_gameRef) _gameRef->OnActivate(false, false); - SDL_ShowCursor(SDL_ENABLE); - break; - - case SDL_WINDOWEVENT_CLOSE: - break; - - } - break; - */ - case Common::EVENT_QUIT: +// Focus-events have been removed (_gameRef->onActivate originally) case Common::EVENT_RTL: + _gameRef->_quitting = true; + break; + case Common::EVENT_QUIT: // Block kept in case we want to support autoSaveOnExit. -//#ifdef __IPHONEOS__ +// Originally this was the behaviour for WME Lite on iOS: // if (_gameRef) { // _gameRef->AutoSaveOnExit(); // _gameRef->_quitting = true; // } -//#else*/ - if (_gameRef) _gameRef->onWindowClose(); -//#endif + if (_gameRef) { + _gameRef->onWindowClose(); + } break; default: // TODO: Do we care about any other events? -- cgit v1.2.3