From d90d9976e8846d316b3a9236c9edc0be6c2adfea Mon Sep 17 00:00:00 2001 From: "j4ck.fr0st" Date: Wed, 24 Feb 2010 19:32:32 +0000 Subject: [PATCH] apply the changes from r5109 to the DX9 plugin aswell. the config dialog does not use wx yet, but the debugger does. Plus cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5121 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoDX9/Src/main.cpp | 29 ++++++--------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index f65fe455d3..7b970843fa 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -57,9 +57,6 @@ GFXDebuggerDX9 *m_DebuggerFrame = NULL; #include "render.h" -// Having to include this is TERRIBLY ugly. FIXME x100 -#include "../../../Core/Core/Src/ConfigManager.h" // FIXME - #include "Utils.h" HINSTANCE g_hInstance = NULL; @@ -111,9 +108,9 @@ wxWindow* GetParentedWxWindow(HWND Parent) } #endif -#if defined(HAVE_WX) && HAVE_WX void DllDebugger(HWND _hParent, bool Show) { +#if defined(HAVE_WX) && HAVE_WX if (!m_DebuggerFrame) m_DebuggerFrame = new GFXDebuggerDX9(GetParentedWxWindow(_hParent)); @@ -121,10 +118,8 @@ void DllDebugger(HWND _hParent, bool Show) m_DebuggerFrame->Show(); else m_DebuggerFrame->Hide(); -} -#else -void DllDebugger(HWND _hParent, bool Show) { } #endif +} #if defined(HAVE_WX) && HAVE_WX class wxDLLApp : public wxApp @@ -144,23 +139,16 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved) { 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; @@ -172,7 +160,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved) unsigned int Callback_PeekMessages() { - //TODO: peek message MSG msg; while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {