mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 02:17:05 +00:00
SCUMM: Check for the appropriate audio tracks for indyzak and zakloom
The FM Towns demos use audio tracks, but neither have a track 1. This caused ScummVM to warn that the audio tracks had not been properly ripped from the CD.
This commit is contained in:
parent
4c11b57ca0
commit
513fffe950
@ -486,8 +486,8 @@ void GUIErrorMessageFormat(Common::U32String fmt, ...) {
|
||||
* @return true if audio files of the expected naming scheme are found, as long as ScummVM
|
||||
* is also built with support to the respective audio format (eg. ogg, flac, mad/mp3)
|
||||
*/
|
||||
bool Engine::existExtractedCDAudioFiles() {
|
||||
return g_system->getAudioCDManager()->existExtractedCDAudioFiles();
|
||||
bool Engine::existExtractedCDAudioFiles(uint track) {
|
||||
return g_system->getAudioCDManager()->existExtractedCDAudioFiles(track);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -602,7 +602,7 @@ public:
|
||||
/**
|
||||
* Check if extracted CD Audio files are found.
|
||||
*/
|
||||
bool existExtractedCDAudioFiles();
|
||||
bool existExtractedCDAudioFiles(uint track = 1);
|
||||
/**
|
||||
* On some systems, check whether the game appears to be run
|
||||
* from the same CD drive, which also should play CD audio.
|
||||
|
@ -1514,7 +1514,21 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
|
||||
|
||||
// On some systems it's not safe to run CD audio games from the CD.
|
||||
if (_game.features & GF_AUDIOTRACKS && !Common::File::exists("CDDA.SOU")) {
|
||||
if (!existExtractedCDAudioFiles()
|
||||
uint track;
|
||||
|
||||
// Usually we check if track 1 is present, but the FM Towns demos use
|
||||
// different ones.
|
||||
|
||||
if (strcmp(_game.gameid, "indyzak") == 0) {
|
||||
// Has only track 17 and 18
|
||||
track = 17;
|
||||
} else if (strcmp(_game.gameid, "zakloom") == 0) {
|
||||
// Has only track 15 and 16
|
||||
track = 15;
|
||||
} else
|
||||
track = 1;
|
||||
|
||||
if (!existExtractedCDAudioFiles(track)
|
||||
&& !isDataAndCDAudioReadFromSameCD()) {
|
||||
warnMissingExtractedCDAudio();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user