Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#1104 closed defect

MI1: -e null doesn't work

Reported by: SF/uweryssel Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 1

Description

The "-e null" option doesn't work with monkeyvga. Although I switched off the music, it is still playing.

I looked into the sources and found the cause in gameDetector.cpp line 663 in "int GameDetector::detectMain()":

/* Use the adlib sound driver if auto mode is selected, * and the game is one of those that want adlib as * default, OR if the game is an older game that doesn't * support anything else anyway. */ if ((_game.adlib & VersionSettings::ADLIB_ALWAYS) || ((_game.adlib & VersionSettings::ADLIB_PREFERRED) && _midi_driver == MD_AUTO)) { _midi_driver = MD_ADLIB; _use_adlib = true; }

ADLIB_ALWAYS is set in case of monkeyvga, so MD_ADLIB overwrites MD_NULL.

A solution is:

if ((_game.adlib & VersionSettings::ADLIB_ALWAYS) && _midi_driver != MD_NULL || ((_game.adlib & VersionSettings::ADLIB_PREFERRED) && _midi_driver == MD_AUTO)) { _midi_driver = MD_ADLIB; _use_adlib = true; }

My version is ScummVM 0.5.0.

Ticket imported from: #782132. Ticket imported from: bugs/1104.

Change History (3)

comment:1 by fingolfin, 21 years ago

Owner: set to SF/jamieson630
Summary: -e null doesn't workMI1: -e null doesn't work

comment:2 by fingolfin, 21 years ago

Fix works OK, Jamieson says it looks OK, too, so I commited it. Thanks.

comment:3 by fingolfin, 21 years ago

Owner: changed from SF/jamieson630 to fingolfin
Status: newclosed
Note: See TracTickets for help on using tickets.