Files
axyz/src/Game/main.cpp
T
2016-02-29 11:44:29 +01:00

27 lines
638 B
C++

#include "Game.h"
#include "MiniDump.h"
LONG WINAPI CrashHandler(EXCEPTION_POINTERS* pException);
int main(int argc, char* argv[])
{
::SetUnhandledExceptionFilter(CrashHandler);
Game game(argc, argv);
while (game.Running()) {
PerformanceTimer::StartTimer("Game-Tick");
game.Tick();
PerformanceTimer::StopTimer("Game-Tick");
}
return 0;
}
LONG WINAPI CrashHandler(EXCEPTION_POINTERS* pException)
{
//Take minidump. path should be bin/TacticalZ.dmp
//Then show MessageBox, and exit application.
Create_Dump(pException, 1, 1);
return EXCEPTION_EXECUTE_HANDLER;// EXCEPTION_CONTINUE_SEARCH
}