From 781472641e32d1999660caa54c27b218c5b4298d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 8 May 2005 13:05:31 +0000 Subject: Made it possible to quit while the game is asking for a CD. svn-id: r17963 --- sword2/resman.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sword2') diff --git a/sword2/resman.cpp b/sword2/resman.cpp index c417676918..417d8fe394 100644 --- a/sword2/resman.cpp +++ b/sword2/resman.cpp @@ -20,6 +20,7 @@ #include "common/stdafx.h" #include "common/file.h" +#include "common/system.h" #include "sword2/sword2.h" #include "sword2/defs.h" #include "sword2/console.h" @@ -565,6 +566,13 @@ void ResourceManager::addToCacheList(Resource *res) { File *ResourceManager::openCluFile(uint16 fileNum) { File *file = new File; while (!file->open(_resFiles[fileNum].fileName)) { + // HACK: We have to check for this, or it'll be impossible to + // quit while the game is asking for the user to insert a CD. + // But recovering from this situation gracefully is just too + // much trouble, so quit now. + if (_vm->_quit) + g_system->quit(); + // If the file is supposed to be on hard disk, or we're // playing a demo, then we're in trouble if the file // can't be found! -- cgit v1.2.3