[Scummvm-cvs-logs] scummvm master -> 68ff933206e091f0cd9712a903228cb9d0801db6

sev- sev at scummvm.org
Mon Feb 1 10:35:48 CET 2016


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3b734082c4 SCUMM: Allow Alt-x to be used to quit SCUMM games.
94cd15bb3e SDL: Do not quit on Alt-x.
68ff933206 Merge pull request #657 from lordhoto/scumm-alt-x


Commit: 3b734082c4cd5e3519fe0260eb12e046ef9b3446
    https://github.com/scummvm/scummvm/commit/3b734082c4cd5e3519fe0260eb12e046ef9b3446
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-29T23:10:36+01:00

Commit Message:
SCUMM: Allow Alt-x to be used to quit SCUMM games.

This includes a TODO to check which SCUMM games actually exhibit this behavior
originally. cbd867329e018d7eca12b3a8842e52b8db9f494d added this behavior to our
backend code initially.

Changed paths:
    NEWS
    README
    engines/scumm/input.cpp



diff --git a/NEWS b/NEWS
index 9ab5798..68811ea 100644
--- a/NEWS
+++ b/NEWS
@@ -65,6 +65,7 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Implemented original Maniac Mansion v0-v1 walking code.
    - It is now possible to play Maniac Mansion from within Day of the
      Tentacle, with a few caveats. See README for details.
+   - Alt-x can now be used to quit SCUMM games on all platforms.
 
  Tinsel:
    - Improved AdLib music support in Discworld 1.
diff --git a/README b/README
index 4d8a514..7a9d87a 100644
--- a/README
+++ b/README
@@ -1505,6 +1505,7 @@ other games.
                              of the middle mouse button or wheel.
 
   SCUMM:
+    Alt-x                  - Quit
     Ctrl 0-9 and Alt 0-9   - Load and save game state
     Ctrl-d                 - Starts the debugger
     Ctrl-f                 - Toggle fast mode
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 3ce053f..1234eda 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -130,6 +130,14 @@ void ScummEngine::parseEvent(Common::Event event) {
 			_debugger->attach();
 		} else if (event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_s) {
 			_res->resourceStats();
+		} else if (event.kbd.hasFlags(Common::KBD_ALT) && event.kbd.keycode == Common::KEYCODE_x) {
+			// TODO: Some SCUMM games quit when Alt-x is pressed. However, not
+			// all of them seem to exhibit this behavior. LordHoto found that
+			// the Loom manual does not mention this hotkey. On the other hand
+			// the Sam&Max manual mentions that Alt-x does so on "most"
+			// platforms. We should really check which games exhibit this
+			// behavior and only use it for them.
+			quitGame();
 		} else {
 			// Normal key press, pass on to the game.
 			_keyPressed = event.kbd;


Commit: 94cd15bb3e07950bd98f8133e552707a33729e47
    https://github.com/scummvm/scummvm/commit/94cd15bb3e07950bd98f8133e552707a33729e47
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-01-29T23:19:08+01:00

Commit Message:
SDL: Do not quit on Alt-x.

This was originally added in cbd867329e018d7eca12b3a8842e52b8db9f494d to
support this LucasArts game hotkey. However, Alt-x is used by other
engines as hotkey. Most notably AGI's Leisure Suit Larry in the Land of the
Lounge Lizards uses it to skip the age protection. Since we handle Alt-x
internally in SCUMM now there is no need to keep this around in our backend
code.

Changed paths:
    NEWS
    README
    backends/events/sdl/sdl-events.cpp



diff --git a/NEWS b/NEWS
index 68811ea..31ca507 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,10 @@ For a more comprehensive changelog of the latest experimental code, see:
  General:
    - Updated Munt MT-32 emulation code to version 1.5.0.
 
+ SDL:
+   - Alt-x no longer quits ScummVM on platforms exhibiting this behavior
+     before. A notable example is our Windows port.
+
  3 Skulls of the Toltecs:
    - Improved AdLib music support.
 
diff --git a/README b/README
index 7a9d87a..a651603 100644
--- a/README
+++ b/README
@@ -1487,7 +1487,7 @@ other games.
     Ctrl-F5                - Displays the Global Menu
     Cmd-q                  - Quit (Mac OS X)
     Ctrl-q                 - Quit (other unices including Linux)
-    Ctrl-z OR Alt-x        - Quit (other platforms)
+    Ctrl-z                 - Quit (other platforms)
     Ctrl-u                 - Mute all sounds
     Ctrl-m                 - Toggle mouse capture
     Ctrl-Alt 1-8           - Switch between graphics filters
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 745f398..81ddd5a 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -545,8 +545,8 @@ bool SdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
 		return true;
 	}
 #else
-	// Ctrl-z and Alt-X quit
-	if ((event.kbd.hasFlags(Common::KBD_CTRL) && ev.key.keysym.sym == 'z') || (event.kbd.hasFlags(Common::KBD_ALT) && ev.key.keysym.sym == 'x')) {
+	// Ctrl-z quits
+	if ((event.kbd.hasFlags(Common::KBD_CTRL) && ev.key.keysym.sym == 'z')) {
 		event.type = Common::EVENT_QUIT;
 		return true;
 	}
@@ -603,11 +603,6 @@ bool SdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
 #if defined(MACOSX)
 	if ((mod & KMOD_META) && ev.key.keysym.sym == 'q')
 		return false;	// On Macintosh, Cmd-Q quits
-#elif defined(POSIX)
-	// Control Q has already been handled above
-#else
-	if ((mod & KMOD_ALT) && ev.key.keysym.sym == 'x')
-		return false;	// Alt-x quit
 #endif
 
 	// If we reached here, this isn't an event handled by handleKeyDown(), thus


Commit: 68ff933206e091f0cd9712a903228cb9d0801db6
    https://github.com/scummvm/scummvm/commit/68ff933206e091f0cd9712a903228cb9d0801db6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-02-01T10:35:13+01:00

Commit Message:
Merge pull request #657 from lordhoto/scumm-alt-x

ALL: Handle Alt-x internally in SCUMM.

Changed paths:
    NEWS
    README
    backends/events/sdl/sdl-events.cpp
    engines/scumm/input.cpp









More information about the Scummvm-git-logs mailing list