display MessageBox in win32 on fatal errors

This commit is contained in:
Eduardo Bart
2011-11-17 00:31:06 -02:00
parent 69ae043001
commit 69a70f28a5
9 changed files with 24 additions and 8 deletions

View File

@@ -289,7 +289,7 @@ void Platform::init(PlatformListener* platformListener, const char *appName)
wc.lpszClassName = win32.appName.c_str(); // Set The Class Name
if(!RegisterClassA(&wc))
logFatal("FATAL ERROR: Failed to register the window class.");
logFatal("Failed to register the window class.");
// force first tick
updateTicks();
@@ -737,3 +737,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
return 0;
}
void Platform::displayFatalError(const std::string& message)
{
MessageBoxA(NULL, message.c_str(), "Fatal Error", MB_OK | MB_ICONERROR);
}