[Scummvm-git-logs] scummvm master -> 9f3f222194e286c2ea40758c3f1ac9bf1b63626c

lephilousophe noreply at scummvm.org
Fri Nov 21 08:05:07 UTC 2025


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:
9f3f222194 SCUMM: Fix GUI options cleanup


Commit: 9f3f222194e286c2ea40758c3f1ac9bf1b63626c
    https://github.com/scummvm/scummvm/commit/9f3f222194e286c2ea40758c3f1ac9bf1b63626c
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-11-21T09:04:49+01:00

Commit Message:
SCUMM: Fix GUI options cleanup

The code relied on the old way where options were 1 byte.

Fixes Trac#16358.

Changed paths:
    engines/scumm/detection_internal.h


diff --git a/engines/scumm/detection_internal.h b/engines/scumm/detection_internal.h
index 8b97e75a642..4b1258592e8 100644
--- a/engines/scumm/detection_internal.h
+++ b/engines/scumm/detection_internal.h
@@ -874,9 +874,7 @@ static Common::String customizeGuiOptions(const DetectorResult &res) {
 		for (int i = 0; i < ARRAYSIZE(mtypes); ++i) {
 			if (!mtypes[i])
 				continue;
-			uint pos = guiOptions.findFirstOf(MidiDriver::musicType2GUIO(mtypes[i]));
-			if (pos != Common::String::npos)
-				guiOptions.erase(pos, 1);
+			Common::replace(guiOptions, MidiDriver::musicType2GUIO(mtypes[i]), Common::String());
 		}
 	}
 
@@ -895,9 +893,7 @@ static Common::String customizeGuiOptions(const DetectorResult &res) {
 	static const char *const rmodes[] = { GUIO_RENDERHERCGREEN, GUIO_RENDERHERCAMBER, GUIO_RENDERCGABW, GUIO_RENDERCGACOMP, GUIO_RENDERCGA };
 	if (res.game.platform == Common::kPlatformAmiga) {
 		for (int i = 0; i < ARRAYSIZE(rmodes); ++i) {
-			uint pos = guiOptions.findFirstOf(rmodes[i][0]);
-			if (pos != Common::String::npos)
-				guiOptions.erase(pos, 1);
+			Common::replace(guiOptions, rmodes[i], Common::String());
 		}
 	}
 




More information about the Scummvm-git-logs mailing list