apply James333 patch to make dx9 plugin use wxwidgets.

some other minor warning fixes.
thanks to James333 nice patch :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5679 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado 2010-06-13 19:41:07 +00:00
parent a524cecfab
commit 20e3919033
8 changed files with 718 additions and 607 deletions

View file

@ -21,6 +21,13 @@
#include "LogManager.h"
#include "debugger/debugger.h"
#if defined(HAVE_WX) && HAVE_WX
#include "DlgSettings.h"
GFXConfigDialogDX *m_ConfigFrame = NULL;
#endif // HAVE_WX
#if defined(HAVE_WX) && HAVE_WX
#include "Debugger/Debugger.h"
GFXDebuggerDX9 *m_DebuggerFrame = NULL;
@ -205,8 +212,33 @@ void DllConfig(HWND _hParent)
// If not initialized, only init D3D so we can enumerate resolutions.
if (!s_PluginInitialized)
D3D::Init();
HINSTANCE hREd = LoadLibrary(_T("riched20.dll"));
DlgSettings_Show(g_hInstance, _hParent);
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx9.ini").c_str());
g_Config.GameIniLoad(globals->game_ini);
UpdateActiveConfig();
#if defined(HAVE_WX) && HAVE_WX
wxWindow *frame = GetParentedWxWindow(_hParent);
m_ConfigFrame = new GFXConfigDialogDX(frame);
// Prevent user to show more than 1 config window at same time
#ifdef _WIN32
frame->Disable();
m_ConfigFrame->CreateGUIControls();
m_ConfigFrame->ShowModal();
frame->Enable();
#else
m_ConfigFrame->CreateGUIControls();
m_ConfigFrame->ShowModal();
#endif
#ifdef _WIN32
frame->SetFocus();
frame->SetHWND(NULL);
#endif
m_ConfigFrame->Destroy();
m_ConfigFrame = NULL;
frame->Destroy();
#endif
if (!s_PluginInitialized)
D3D::Shutdown();
}
@ -341,7 +373,6 @@ void VideoFifo_CheckSwapRequest()
{
Renderer::Swap(s_beginFieldArgs.xfbAddr, s_beginFieldArgs.field, s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight);
}
Common::AtomicStoreRelease(s_swapRequested, FALSE);
}
}