[Scummvm-git-logs] scummvm master -> f7b96c57f72241a0aa43251f9fabe899cbd1947b

eriktorbjorn eriktorbjorn at telia.com
Sat Jun 12 11:15:35 UTC 2021


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

Summary:
f7b96c57f7 MT32: Don't show LCD messages on-screen if they contain only spaces


Commit: f7b96c57f72241a0aa43251f9fabe899cbd1947b
    https://github.com/scummvm/scummvm/commit/f7b96c57f72241a0aa43251f9fabe899cbd1947b
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-06-12T13:14:51+02:00

Commit Message:
MT32: Don't show LCD messages on-screen if they contain only spaces

E.g. the first message in Operation Stealth. It just looks like
something went wrong.

Changed paths:
    audio/softsynth/mt32.cpp


diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index aa1ebcd4e2..e2803b168a 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -77,7 +77,14 @@ public:
 		error("MT32emu: Init Error - Missing PCM ROM image");
 	}
 	void showLCDMessage(const char *message) {
-		Common::OSDMessageQueue::instance().addMessage(Common::U32String(message));
+		// Don't show messages that are only spaces, e.g. the first
+		// message in Operation Stealth.
+		for (const char *ptr = message; *ptr; ptr++) {
+			if (*ptr != ' ') {
+				Common::OSDMessageQueue::instance().addMessage(Common::U32String(message));
+				break;
+			}
+		}
 	}
 
 	// Unused callbacks




More information about the Scummvm-git-logs mailing list