From 61954b7661001b294d2a4ef249f86e2f9940e51f Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Tue, 17 Nov 2009 18:46:42 +0100 Subject: [PATCH] better debug message when gameloop crashes --- src/CGame.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CGame.cpp b/src/CGame.cpp index 8fd291ad5..a02963812 100644 --- a/src/CGame.cpp +++ b/src/CGame.cpp @@ -25,6 +25,7 @@ #include "sdl/sound/CSound.h" #include "sdl/CVideoDriver.h" #include "vorticon/COrderingInfo.h" +#include "Debug.h" CGame::CGame() { m_Episode = 0; @@ -213,6 +214,8 @@ short CGame::runCycle(stCloneKeenPlus *pCKP) if(pCKP->shutdown == SHUTDOWN_NEW_GAME) return 0; g_pLogFile->ftextOut("bottom of game control loop opt=%d crashflag=%d
", opt, crashflag); + if(crashflag) + errors << "crash: " << why_term_ptr << " ; " << crashflag2 << " ; " << crashflag3 << endl; if(pCKP->shutdown == SHUTDOWN_EXIT) break; } while(opt != MAINMNU_QUIT && opt != MAINMNU_NEW_GAME && !crashflag);