mirror of https://github.com/bsnes-emu/bsnes.git
v112.3
Improvements to ruby driver crash detection. Workaround added for rare crash on close on Windows.
This commit is contained in:
parent
dafd673177
commit
6aa7c944d5
|
@ -29,7 +29,7 @@ using namespace nall;
|
|||
|
||||
namespace Emulator {
|
||||
static const string Name = "bsnes";
|
||||
static const string Version = "112.12";
|
||||
static const string Version = "112.13";
|
||||
static const string Author = "byuu";
|
||||
static const string License = "GPLv3";
|
||||
static const string Website = "https://byuu.org";
|
||||
|
|
|
@ -44,8 +44,7 @@ auto Program::create() -> void {
|
|||
stateManager.create();
|
||||
manifestViewer.create();
|
||||
|
||||
//seems to be misfiring on Windows, so disable for now
|
||||
if(0 && settings.general.crashed) {
|
||||
if(settings.general.crashed) {
|
||||
MessageDialog(
|
||||
"Driver crash detected. Hardware drivers have been disabled.\n"
|
||||
"Please reconfigure drivers in the advanced settings panel."
|
||||
|
@ -124,10 +123,22 @@ auto Program::quit() -> void {
|
|||
presentation.setVisible(false);
|
||||
Application::processEvents();
|
||||
|
||||
//in case the emulator was closed prior to initialization completing:
|
||||
settings.general.crashed = false;
|
||||
|
||||
unload();
|
||||
settings.save();
|
||||
video.reset();
|
||||
audio.reset();
|
||||
input.reset();
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
//in rare cases, when Application::exit() calls exit(0), a crash will occur.
|
||||
//this seems to be due to the internal state of certain ruby drivers.
|
||||
auto processID = GetCurrentProcessId();
|
||||
auto handle = OpenProcess(SYNCHRONIZE | PROCESS_TERMINATE, true, processID);
|
||||
TerminateProcess(handle, 0);
|
||||
#endif
|
||||
|
||||
Application::exit();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue