[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.500,1.501

kirben kirben at users.sourceforge.net
Mon May 9 04:42:08 CEST 2005


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

Modified Files:
	simon.cpp 
Log Message:

Use debugger for errors.


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.500
retrieving revision 1.501
diff -u -d -r1.500 -r1.501
--- simon.cpp	9 May 2005 10:54:24 -0000	1.500
+++ simon.cpp	9 May 2005 11:39:31 -0000	1.501
@@ -755,6 +755,14 @@
 
 void SimonEngine::errorString(const char *buf1, char *buf2) {
 	strcpy(buf2, buf1);
+
+	// Unless an error -originated- within the debugger, spawn the debugger. Otherwise
+	// exit out normally.
+	if (_debugger && !_debugger->isAttached()) {
+		printf("%s\n", buf2);	// (Print it again in case debugger segfaults)
+		_debugger->attach(buf2);
+		_debugger->onFrame();
+	}
 }
 
 void palette_fadeout(uint32 *pal_values, uint num) {





More information about the Scummvm-git-logs mailing list