diff --git a/Source/Core/DolphinWX/resources/Flag_Korea.xpm b/Source/Core/DolphinWX/resources/Flag_Korea.xpm index 2ab29ea9b8..7b51bc78ef 100644 --- a/Source/Core/DolphinWX/resources/Flag_Korea.xpm +++ b/Source/Core/DolphinWX/resources/Flag_Korea.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *Flag_Korea_xpm[] = { +static const char *const Flag_Korea_xpm[] = { /* columns rows colors chars-per-pixel */ "96 32 210 2", ". c Black", diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp index 9ef9fc8645..de8835967a 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp @@ -89,18 +89,14 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle { #if defined(HAVE_WX) && HAVE_WX wxSetInstance((HINSTANCE)hinstDLL); - int argc = 0; - char **argv = NULL; - wxEntryStart(argc, argv); - if (!wxTheApp || !wxTheApp->CallOnInit()) - return FALSE; + wxInitialize(); #endif } break; case DLL_PROCESS_DETACH: #if defined(HAVE_WX) && HAVE_WX - wxEntryCleanup(); + wxUninitialize(); #endif break; default: @@ -191,13 +187,12 @@ void DllConfig(HWND _hParent) // Only allow one open at a time m_ConfigFrame->ShowModal(); - - delete m_ConfigFrame; + m_ConfigFrame->Destroy(); + m_ConfigFrame = NULL; #ifdef _WIN32 frame->SetHWND(NULL); #endif delete frame; - m_ConfigFrame = 0; } #endif } diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp index cb06e55f54..779b57d806 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp @@ -76,18 +76,14 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle { #if defined(HAVE_WX) && HAVE_WX wxSetInstance((HINSTANCE)hinstDLL); - int argc = 0; - char **argv = NULL; - wxEntryStart(argc, argv); - if (!wxTheApp || !wxTheApp->CallOnInit()) - return FALSE; + wxInitialize(); #endif } break; case DLL_PROCESS_DETACH: #if defined(HAVE_WX) && HAVE_WX - wxEntryCleanup(); + wxUninitialize(); #endif break; default: @@ -155,9 +151,8 @@ void DllConfig(HWND _hParent) // Only allow one open at a time m_ConfigFrame->ShowModal(); - - delete m_ConfigFrame; - m_ConfigFrame = 0; + m_ConfigFrame->Destroy(); + m_ConfigFrame = NULL; } #endif } diff --git a/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp b/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp index 4f4282a363..d399144c61 100644 --- a/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp +++ b/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp @@ -73,7 +73,7 @@ class wxDLLApp : public wxApp } }; IMPLEMENT_APP_NO_MAIN(wxDLLApp) - WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); +WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); #endif 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 wxSetInstance((HINSTANCE)hinstDLL); - int argc = 0; - char **argv = NULL; - wxEntryStart(argc, argv); - if (!wxTheApp || !wxTheApp->CallOnInit()) - return FALSE; + wxInitialize(); #endif } break; case DLL_PROCESS_DETACH: #if defined(HAVE_WX) && HAVE_WX - wxEntryCleanup(); + wxUninitialize(); #endif break; default: diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp index 0831d97463..3ad0ee1a1d 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp @@ -37,15 +37,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 // ------------------ @@ -57,24 +57,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 - // This causes a "stop hang", if the gfx config dialog has been opened. - // Old comment: "Use wxUninitialize() if you don't want GUI" - wxEntryCleanup(); - #endif +#if defined(HAVE_WX) && HAVE_WX + wxUninitialize(); +#endif break; default: break; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index c751237a5d..dd0d1bc108 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -298,13 +298,12 @@ void DllConfig(HWND _hParent) allowConfigShow = false; m_ConfigFrame->CreateGUIControls(); allowConfigShow = m_ConfigFrame->ShowModal() == 1 ? true : false; - - delete m_ConfigFrame; + m_ConfigFrame->Destroy(); + m_ConfigFrame = NULL; #ifdef _WIN32 frame->SetHWND(NULL); #endif delete frame; - m_ConfigFrame = 0; } #endif } diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp index 1ce1763454..eccb437aeb 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp @@ -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; diff --git a/Source/Plugins/Plugin_Wiimote/Src/main.cpp b/Source/Plugins/Plugin_Wiimote/Src/main.cpp index 35643ed8a5..b0840114e7 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/main.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/main.cpp @@ -84,7 +84,7 @@ class wxDLLApp : public wxApp return true; } }; -IMPLEMENT_APP_NO_MAIN(wxDLLApp) +IMPLEMENT_APP_NO_MAIN(wxDLLApp) WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); #endif @@ -98,18 +98,14 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle { #if defined(HAVE_WX) && HAVE_WX wxSetInstance((HINSTANCE)hinstDLL); - int argc = 0; - char **argv = NULL; - wxEntryStart(argc, argv); - if (!wxTheApp || !wxTheApp->CallOnInit()) - return FALSE; + wxInitialize(); #endif } break; case DLL_PROCESS_DETACH: #if defined(HAVE_WX) && HAVE_WX - wxEntryCleanup(); + wxUninitialize(); #endif break; default: