From f0b76ada6d0fb1eb9a299f131eb69ed084186fba Mon Sep 17 00:00:00 2001 From: riccardom Date: Fri, 2 Apr 2010 13:49:57 +0000 Subject: [PATCH] Shutdown the machine before exiting, otherwise we can segfault if a rom is playing. It also cleanups valgrind output when looking for leaks. --- desmume/src/wx/wxMain.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/desmume/src/wx/wxMain.cpp b/desmume/src/wx/wxMain.cpp index 26e650e16..72ba38ca1 100644 --- a/desmume/src/wx/wxMain.cpp +++ b/desmume/src/wx/wxMain.cpp @@ -95,7 +95,13 @@ public: delete history; } - void OnQuit(wxCommandEvent& WXUNUSED(event)){Close(true);} + void OnQuit(wxCommandEvent& WXUNUSED(event)) + { + execute = false; + NDS_DeInit(); + Close(true); + } + void OnAbout(wxCommandEvent& WXUNUSED(event)) { wxMessageBox(