Fixes issue 2331, plugins won't cause a crash/hang on stop anymore if their config dialog was opened, note that stopping a game while a config dialog is open still causes a crash (that should not be possible in the first place since the dialogs are modals, but heh...).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5109 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s
2010-02-22 04:59:57 +00:00
parent ae945ec90e
commit ffdf087aad
8 changed files with 45 additions and 76 deletions

View File

@ -33,15 +33,15 @@
HINSTANCE g_hInstance;
#if defined(HAVE_WX) && HAVE_WX
class wxDLLApp : public wxApp
class wxDLLApp : public wxApp
{
bool OnInit()
{
bool OnInit()
{
return true;
}
};
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
return true;
}
};
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
#endif
// ------------------
@ -53,22 +53,17 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
{
case DLL_PROCESS_ATTACH:
{
#if defined(HAVE_WX) && HAVE_WX
// Use wxInitialize() if you don't want GUI instead of the following 12 lines
#if defined(HAVE_WX) && HAVE_WX
wxSetInstance((HINSTANCE)hinstDLL);
int argc = 0;
char **argv = NULL;
wxEntryStart(argc, argv);
if (!wxTheApp || !wxTheApp->CallOnInit())
return FALSE;
#endif
wxInitialize();
#endif
}
break;
case DLL_PROCESS_DETACH:
#if defined(HAVE_WX) && HAVE_WX
wxEntryCleanup();
#endif
#if defined(HAVE_WX) && HAVE_WX
wxUninitialize();
#endif
break;
default:
break;