[Scummvm-git-logs] scummvm master -> 57dcaf1a8fae7541609ba13a6776f57f0e97211c

antoniou79 noreply at scummvm.org
Mon Aug 4 13:22:06 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:
57dcaf1a8f BLADERUNNER: Remove need for midi component


Commit: 57dcaf1a8fae7541609ba13a6776f57f0e97211c
    https://github.com/scummvm/scummvm/commit/57dcaf1a8fae7541609ba13a6776f57f0e97211c
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-08-04T16:16:07+03:00

Commit Message:
BLADERUNNER: Remove need for midi component

This modifies a behavior previously set by commit a78efc244c66331360cb2dac0cef168a8841f7d5

Under Global Options > Audio > Preferred device, and under Game Options > Audio > Music device, the user can select MIDI driver for music or set "No Music" from a dropdown menu.
These options are available through the game specific settings, even if the game sets GUIO_NOMIDI in its detection entries.
So we choose to respect a user's setting of "No Music" there, by turning off the music.
Only this setting is respected. All other options in that dropdown are treated as irrelevant, and if selected, the music will play in-game.

Changed paths:
    engines/bladerunner/bladerunner.cpp


diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index ad0cf7a4f58..de2d2816d00 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -95,7 +95,6 @@
 #include "engines/advancedDetector.h"
 
 #include "graphics/thumbnail.h"
-#include "audio/mididrv.h"
 
 namespace BladeRunner {
 
@@ -617,18 +616,17 @@ bool BladeRunnerEngine::startup(bool hasSavegames) {
 
 	_ambientSounds = new AmbientSounds(this);
 
-	// Query the selected music device (defaults to MT_AUTO device).
+	// Get the selected "music device" (defaults to MT_AUTO device)
+	// as set from Audio > Music Device dropdown setting, which commonly is for MIDI driver selection.
+	// Since this engine does not use MIDI, but the setting is still available from the "Global Options... > Audio"
+	// and the specific game options (Game Options... > Audio), we respect only the option "No Music" to avoid end user confusion.
+	// All other options for this dropdown will result in music playing and are treated as irrelevant.
 	Common::String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
-	MidiDriver::DeviceHandle dev = MidiDriver::getDeviceHandle(selDevStr.empty() ? Common::String("auto") : selDevStr);
-	//
-	// We just respect the "No Music" choice (or an invalid choice)
-	//
-	// We're lenient with all the invalid/ irrelevant choices in the Audio Driver dropdown
-	// TODO Ideally these controls (OptionsDialog::addAudioControls()) ie. "Music Device" and "Adlib Emulator"
-	//      should not appear in games like Blade Runner, since they are largely irrelevant
-	//      and may cause confusion when combined/ conflicting with the global settings
-	//      which are by default applied, if the user does not explicitly override them.
-	_noMusicDriver = (MidiDriver::getMusicType(dev) == MT_NULL || MidiDriver::getMusicType(dev) == MT_INVALID);
+	_noMusicDriver = (selDevStr.compareToIgnoreCase(Common::String("null")) == 0);
+
+	if (_noMusicDriver) {
+		warning("AUDIO: MUSIC IS FORCED TO OFF (BY THE MIDI DRIVER SETTING - music_driver was set to \"null\")");
+	}
 
 	// BLADE.INI was read here, but it was replaced by ScummVM configuration
 	//




More information about the Scummvm-git-logs mailing list