You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Added a crash handler to dump the backtrace on Windows, Linux and OS X
This commit is contained in:
@@ -156,10 +156,7 @@ int widechar_main(int argc, wchar_t **argv) {
|
||||
return os.get_exit_code();
|
||||
};
|
||||
|
||||
int main(int _argc, char **_argv) {
|
||||
// _argc and _argv are ignored
|
||||
// we are going to use the WideChar version of them instead
|
||||
|
||||
int _main() {
|
||||
LPWSTR *wc_argv;
|
||||
int argc;
|
||||
int result;
|
||||
@@ -177,6 +174,21 @@ int main(int _argc, char **_argv) {
|
||||
return result;
|
||||
}
|
||||
|
||||
int main(int _argc, char **_argv) {
|
||||
// _argc and _argv are ignored
|
||||
// we are going to use the WideChar version of them instead
|
||||
|
||||
#ifdef CRASH_HANDLER_EXCEPTION
|
||||
__try {
|
||||
return _main();
|
||||
} __except (CrashHandlerException(GetExceptionInformation())) {
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
return _main();
|
||||
#endif
|
||||
}
|
||||
|
||||
HINSTANCE godot_hinstance = NULL;
|
||||
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
|
||||
|
||||
Reference in New Issue
Block a user