[Scummvm-cvs-logs] CVS: scummvm/sword2 resman.cpp,1.110,1.111

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Sun May 8 06:06:49 CEST 2005


Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7748

Modified Files:
	resman.cpp 
Log Message:
Made it possible to quit while the game is asking for a CD.


Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/resman.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- resman.cpp	25 Feb 2005 14:19:30 -0000	1.110
+++ resman.cpp	8 May 2005 13:05:31 -0000	1.111
@@ -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 @@
 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!





More information about the Scummvm-git-logs mailing list