On crash, takes minidump, then show MessageBox, and exit app.
This commit is contained in:
+18
-4
@@ -1,11 +1,25 @@
|
||||
#include "Game.h"
|
||||
#include "MiniDump.h"
|
||||
|
||||
LONG WINAPI CrashHandler(EXCEPTION_POINTERS* pException);
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Game game(argc, argv);
|
||||
while (game.Running()) {
|
||||
game.Tick();
|
||||
}
|
||||
::SetUnhandledExceptionFilter(CrashHandler);
|
||||
|
||||
Game game(argc, argv);
|
||||
while (game.Running()) {
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user