aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-08-11 02:42:37 +0200
committerEinar Johan Trøan Sømåen2012-08-11 02:42:37 +0200
commit089920377f0399dddf2f40b6687dd41276cd75d5 (patch)
tree295775facacb26291e63c8dd8a787dfe1cafb509 /engines/wintermute
parent9a5f363972759158a66b5c7c34726db4318b8092 (diff)
downloadscummvm-rg350-089920377f0399dddf2f40b6687dd41276cd75d5.tar.gz
scummvm-rg350-089920377f0399dddf2f40b6687dd41276cd75d5.tar.bz2
scummvm-rg350-089920377f0399dddf2f40b6687dd41276cd75d5.zip
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.
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/platform_osystem.cpp46
1 files 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?