mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-27 00:05:34 +01:00
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:
parent
ae945ec90e
commit
ffdf087aad
@ -1,5 +1,5 @@
|
|||||||
/* XPM */
|
/* XPM */
|
||||||
static char *Flag_Korea_xpm[] = {
|
static const char *const Flag_Korea_xpm[] = {
|
||||||
/* columns rows colors chars-per-pixel */
|
/* columns rows colors chars-per-pixel */
|
||||||
"96 32 210 2",
|
"96 32 210 2",
|
||||||
". c Black",
|
". c Black",
|
||||||
|
@ -89,18 +89,14 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxSetInstance((HINSTANCE)hinstDLL);
|
wxSetInstance((HINSTANCE)hinstDLL);
|
||||||
int argc = 0;
|
wxInitialize();
|
||||||
char **argv = NULL;
|
|
||||||
wxEntryStart(argc, argv);
|
|
||||||
if (!wxTheApp || !wxTheApp->CallOnInit())
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxEntryCleanup();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -191,13 +187,12 @@ void DllConfig(HWND _hParent)
|
|||||||
|
|
||||||
// Only allow one open at a time
|
// Only allow one open at a time
|
||||||
m_ConfigFrame->ShowModal();
|
m_ConfigFrame->ShowModal();
|
||||||
|
m_ConfigFrame->Destroy();
|
||||||
delete m_ConfigFrame;
|
m_ConfigFrame = NULL;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
frame->SetHWND(NULL);
|
frame->SetHWND(NULL);
|
||||||
#endif
|
#endif
|
||||||
delete frame;
|
delete frame;
|
||||||
m_ConfigFrame = 0;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -76,18 +76,14 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxSetInstance((HINSTANCE)hinstDLL);
|
wxSetInstance((HINSTANCE)hinstDLL);
|
||||||
int argc = 0;
|
wxInitialize();
|
||||||
char **argv = NULL;
|
|
||||||
wxEntryStart(argc, argv);
|
|
||||||
if (!wxTheApp || !wxTheApp->CallOnInit())
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxEntryCleanup();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -155,9 +151,8 @@ void DllConfig(HWND _hParent)
|
|||||||
|
|
||||||
// Only allow one open at a time
|
// Only allow one open at a time
|
||||||
m_ConfigFrame->ShowModal();
|
m_ConfigFrame->ShowModal();
|
||||||
|
m_ConfigFrame->Destroy();
|
||||||
delete m_ConfigFrame;
|
m_ConfigFrame = NULL;
|
||||||
m_ConfigFrame = 0;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ class wxDLLApp : public wxApp
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||||
@ -86,18 +86,14 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxSetInstance((HINSTANCE)hinstDLL);
|
wxSetInstance((HINSTANCE)hinstDLL);
|
||||||
int argc = 0;
|
wxInitialize();
|
||||||
char **argv = NULL;
|
|
||||||
wxEntryStart(argc, argv);
|
|
||||||
if (!wxTheApp || !wxTheApp->CallOnInit())
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxEntryCleanup();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -37,15 +37,15 @@
|
|||||||
HINSTANCE g_hInstance;
|
HINSTANCE g_hInstance;
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
class wxDLLApp : public wxApp
|
class wxDLLApp : public wxApp
|
||||||
{
|
{
|
||||||
bool OnInit()
|
bool OnInit()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||||
#endif
|
#endif
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
@ -57,24 +57,17 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
// Use wxInitialize() if you don't want GUI instead of the following 12 lines
|
|
||||||
wxSetInstance((HINSTANCE)hinstDLL);
|
wxSetInstance((HINSTANCE)hinstDLL);
|
||||||
int argc = 0;
|
wxInitialize();
|
||||||
char **argv = NULL;
|
#endif
|
||||||
wxEntryStart(argc, argv);
|
|
||||||
if (!wxTheApp || !wxTheApp->CallOnInit())
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
// This causes a "stop hang", if the gfx config dialog has been opened.
|
wxUninitialize();
|
||||||
// Old comment: "Use wxUninitialize() if you don't want GUI"
|
#endif
|
||||||
wxEntryCleanup();
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -298,13 +298,12 @@ void DllConfig(HWND _hParent)
|
|||||||
allowConfigShow = false;
|
allowConfigShow = false;
|
||||||
m_ConfigFrame->CreateGUIControls();
|
m_ConfigFrame->CreateGUIControls();
|
||||||
allowConfigShow = m_ConfigFrame->ShowModal() == 1 ? true : false;
|
allowConfigShow = m_ConfigFrame->ShowModal() == 1 ? true : false;
|
||||||
|
m_ConfigFrame->Destroy();
|
||||||
delete m_ConfigFrame;
|
m_ConfigFrame = NULL;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
frame->SetHWND(NULL);
|
frame->SetHWND(NULL);
|
||||||
#endif
|
#endif
|
||||||
delete frame;
|
delete frame;
|
||||||
m_ConfigFrame = 0;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -33,15 +33,15 @@
|
|||||||
HINSTANCE g_hInstance;
|
HINSTANCE g_hInstance;
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
class wxDLLApp : public wxApp
|
class wxDLLApp : public wxApp
|
||||||
{
|
{
|
||||||
bool OnInit()
|
bool OnInit()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||||
#endif
|
#endif
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
@ -53,22 +53,17 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
// Use wxInitialize() if you don't want GUI instead of the following 12 lines
|
|
||||||
wxSetInstance((HINSTANCE)hinstDLL);
|
wxSetInstance((HINSTANCE)hinstDLL);
|
||||||
int argc = 0;
|
wxInitialize();
|
||||||
char **argv = NULL;
|
#endif
|
||||||
wxEntryStart(argc, argv);
|
|
||||||
if (!wxTheApp || !wxTheApp->CallOnInit())
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxEntryCleanup();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -98,18 +98,14 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxSetInstance((HINSTANCE)hinstDLL);
|
wxSetInstance((HINSTANCE)hinstDLL);
|
||||||
int argc = 0;
|
wxInitialize();
|
||||||
char **argv = NULL;
|
|
||||||
wxEntryStart(argc, argv);
|
|
||||||
if (!wxTheApp || !wxTheApp->CallOnInit())
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxEntryCleanup();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user