Skip to content

Commit

Permalink
SCI: Add hack for Pepper's Adventure in Time CDAUDIO issue
Browse files Browse the repository at this point in the history
Game checks for file CDAUDIO. Currently the kFileIO(Exists)
code is working pretty slowly on at least Windows. Needs to get
fixed properly by enhancing SaveFileManager().
This is primarily for branch 1.8.0.
  • Loading branch information
Martin Kiewitz committed Feb 22, 2016
1 parent 27398bd commit 6e4cbca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions engines/sci/engine/kfile.cpp
Expand Up @@ -601,6 +601,16 @@ reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) {

bool exists = false;

if (g_sci->getGameId() == GID_PEPPER) {
// HACK: Special case for Pepper's Adventure in Time
// The game checks like crazy for the file CDAUDIO when entering the game menu.
// On at least Windows that makes the engine slow down to a crawl and takes at least 1 second.
// Should get solved properly by changing the code below. This here is basically for 1.8.0 release.
// TODO: Fix this properly.
if (name == "CDAUDIO")
return NULL_REG;
}

// Check for regular file
exists = Common::File::exists(name);

Expand Down

0 comments on commit 6e4cbca

Please sign in to comment.