[Scummvm-git-logs] scummvm master -> 76761cefe2ce36e5f3b860ea60cd8b6e1ca972bd

dreammaster noreply at scummvm.org
Sat Aug 1 07:46:49 UTC 2026


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

Summary:
76761cefe2 MADS: NEBULAR: Fixes to saving/restoring using original dialog


Commit: 76761cefe2ce36e5f3b860ea60cd8b6e1ca972bd
    https://github.com/scummvm/scummvm/commit/76761cefe2ce36e5f3b860ea60cd8b6e1ca972bd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-01T17:46:41+10:00

Commit Message:
MADS: NEBULAR: Fixes to saving/restoring using original dialog

Changed paths:
    engines/mads/mads.cpp
    engines/mads/nebular/menus.cpp


diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp
index c12bafba926..b1d433b0730 100644
--- a/engines/mads/mads.cpp
+++ b/engines/mads/mads.cpp
@@ -331,7 +331,8 @@ void MADSEngine::updateScreen() {
 
 bool MADSEngine::isSpecialKey(Common::KeyCode key) const {
 	static const Common::KeyCode KEYS[] = {
-		Common::KEYCODE_LCTRL, Common::KEYCODE_LALT, Common::KEYCODE_RSHIFT, Common::KEYCODE_RALT,
+		Common::KEYCODE_LCTRL, Common::KEYCODE_LALT, Common::KEYCODE_LSHIFT,
+		Common::KEYCODE_RCTRL, Common::KEYCODE_RALT, Common::KEYCODE_RSHIFT
 	};
 
 	for (const Common::KeyCode &kc : KEYS) {
@@ -369,7 +370,7 @@ int MADSEngine::getKey() {
 
 	if (!_keyEvents.empty()) {
 		Common::KeyState ks = _keyEvents.pop();
-		return ks.ascii && (ks.flags == 0) ? ks.ascii : (ks.flags << 16) | ks.keycode;
+		return ks.ascii && ((ks.flags & (Common::KBD_CTRL | Common::KBD_ALT)) == 0) ? ks.ascii : (ks.flags << 16) | ks.keycode;
 	}
 
 	return 0;
diff --git a/engines/mads/nebular/menus.cpp b/engines/mads/nebular/menus.cpp
index f79b3ccadb6..b3dc37d3648 100644
--- a/engines/mads/nebular/menus.cpp
+++ b/engines/mads/nebular/menus.cpp
@@ -143,6 +143,8 @@ static void game_menu_setup() {
 
 	menu = (MenuMessage *)malloc(MAX_MENU_MESSAGE * sizeof(MenuMessage));
 
+	trash_bag = (byte *)mem_get((GAME_MENU_MAX_ITEMS + 1) * 80);
+
 	choose_menu_background();
 
 	kernel.quotes = quote_load(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
@@ -239,6 +241,7 @@ static void game_menu_shutdown() {
 	mem_free(kernel.quotes);
 	kernel.quotes = nullptr;
 
+	free(trash_bag);
 	free(menu);
 	menu = nullptr;
 
@@ -1377,7 +1380,7 @@ static void game_menu_save() {
 	if (game_menu_selected_item == 15) {
 		id = game_menu_save_select;
 		game.last_save = id;
-		global_save(id, game_menu_save_buffer);
+		global_save(id, game_menu_save_pointer);
 		kernel.activate_menu = GAME_ALERT_MENU;
 	}
 }




More information about the Scummvm-git-logs mailing list