show-dll-error-dialog

This commit is contained in:
David Rose 2009-09-16 20:37:42 +00:00
parent 265236f6de
commit e9b573cb19
2 changed files with 11 additions and 1 deletions

View File

@ -50,7 +50,6 @@ load_dso(const DSearchPath &path, const Filename &filename) {
return NULL;
}
string os_specific = abspath.to_os_specific();
SetErrorMode(0);
// Try using LoadLibraryEx, if possible.
typedef HMODULE (WINAPI *tLoadLibraryEx)(LPCTSTR, HANDLE, DWORD);

View File

@ -390,6 +390,17 @@ reload_implicit_pages() {
"or \"mac\"."));
PandaFileStreamBuf::_newline_mode = newline_mode;
#endif // USE_PANDAFILESTREAM
#ifdef WIN32
// We don't necessarily want an error dialog when we fail to load a
// .dll file. But sometimes it is useful for debugging.
if (ConfigVariableBool("show-dll-error-dialog", false)) {
SetErrorMode(0);
} else {
SetErrorMode(SEM_FAILCRITICALERRORS);
}
#endif
}
////////////////////////////////////////////////////////////////////