finish proper window handling, fix the modal state of the config dialogs, plus some minor cleanup/changes :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5129 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
4915097d93
commit
816febd3b0
|
@ -317,7 +317,7 @@ void *CPluginManager::LoadPlugin(const char *_rFilename)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Check that the plugin has both all the common and all the type specific functions
|
||||
// Check that the plugin has all the common and all the type specific functions
|
||||
if (!plugin->IsValid())
|
||||
{
|
||||
PanicAlert("Can't open %s, it has a missing function", _rFilename);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
BEGIN_EVENT_TABLE(AboutDolphin, wxDialog)
|
||||
EVT_CLOSE(AboutDolphin::OnClose)
|
||||
EVT_BUTTON(ID_CLOSE, AboutDolphin::CloseClick)
|
||||
EVT_BUTTON(wxID_CLOSE, AboutDolphin::CloseClick)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||
|
@ -38,7 +38,7 @@ AboutDolphin::~AboutDolphin()
|
|||
|
||||
void AboutDolphin::CreateGUIControls()
|
||||
{
|
||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
//miloszwl@miloszwl.com (miloszwl.deviantart.com)
|
||||
|
||||
wxMemoryInputStream istream(dolphin_logo_png, sizeof dolphin_logo_png);
|
||||
|
@ -79,8 +79,8 @@ void AboutDolphin::CreateGUIControls()
|
|||
this->SetSizer(sMain);
|
||||
sMain->Layout();
|
||||
|
||||
CenterOnParent();
|
||||
Fit();
|
||||
CenterOnParent();
|
||||
}
|
||||
|
||||
void AboutDolphin::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||
|
|
|
@ -29,7 +29,7 @@ class AboutDolphin : public wxDialog
|
|||
{
|
||||
public:
|
||||
AboutDolphin(wxWindow *parent,
|
||||
wxWindowID id = 1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("About Dolphin"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
|
@ -52,8 +52,7 @@ class AboutDolphin : public wxDialog
|
|||
|
||||
enum
|
||||
{
|
||||
ID_CLOSE = 1000,
|
||||
ID_LOGO,
|
||||
ID_LOGO = 1000,
|
||||
ID_MESSAGE
|
||||
};
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ CFrame::CFrame(wxFrame* parent,
|
|||
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
|
||||
, m_LogWindow(NULL)
|
||||
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false)
|
||||
, m_bModalDialogOpen(false), m_bControlsCreated(false), m_StopDlg(NULL)
|
||||
, m_bControlsCreated(false), m_StopDlg(NULL)
|
||||
#if wxUSE_TIMER
|
||||
#ifdef _WIN32
|
||||
, m_fLastClickTime(0), m_iLastMotionTime(0), LastMouseX(0), LastMouseY(0)
|
||||
|
@ -610,11 +610,16 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|||
{
|
||||
case SC_SCREENSAVE:
|
||||
case SC_MONITORPOWER:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void CFrame::OnTimer(wxTimerEvent& WXUNUSED(event))
|
||||
|
@ -928,13 +933,13 @@ void X11_ShowFullScreen(bool bF)
|
|||
void CFrame::DoFullscreen(bool bF)
|
||||
{
|
||||
#if defined HAVE_X11 && HAVE_X11
|
||||
if ((Core::GetState() == Core::CORE_RUN) && !m_bModalDialogOpen)
|
||||
if ((Core::GetState() == Core::CORE_RUN))
|
||||
X11_ShowFullScreen(bF);
|
||||
#endif
|
||||
// Only switch this to fullscreen if we're rendering to main AND if we're running a game
|
||||
// plus if a modal dialog is open, this will still process the keyboard events, and may cause
|
||||
// the main window to become unresponsive, so we have to avoid that.
|
||||
if ((bRenderToMain && Core::GetState() == Core::CORE_RUN) && !m_bModalDialogOpen)
|
||||
if ((bRenderToMain && Core::GetState() == Core::CORE_RUN))
|
||||
{
|
||||
ShowFullScreen(bF);
|
||||
|
||||
|
|
|
@ -199,7 +199,6 @@ class CFrame : public wxFrame
|
|||
bool m_bEdit;
|
||||
bool m_bTabSplit;
|
||||
bool m_bNoDocking;
|
||||
bool m_bModalDialogOpen;
|
||||
bool m_bControlsCreated;
|
||||
char newDiscpath[2048];
|
||||
wxMessageDialog *m_StopDlg;
|
||||
|
|
|
@ -282,6 +282,7 @@ void CMemcardManager::CreateGUIControls()
|
|||
this->SetSizer(sMain);
|
||||
sMain->SetSizeHints(this);
|
||||
Fit();
|
||||
Center();
|
||||
|
||||
for (int i = SLOT_A; i < SLOT_B + 1; i++)
|
||||
{
|
||||
|
|
|
@ -47,12 +47,11 @@
|
|||
#endif
|
||||
|
||||
|
||||
class CMemcardManager
|
||||
: public wxDialog
|
||||
class CMemcardManager : public wxDialog
|
||||
{
|
||||
public:
|
||||
|
||||
CMemcardManager(wxWindow *parent, wxWindowID id = 1, const wxString& title = wxT(MEMCARDMAN_TITLE),
|
||||
CMemcardManager(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& title = wxT(MEMCARDMAN_TITLE),
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MEMCARD_MANAGER_STYLE);
|
||||
virtual ~CMemcardManager();
|
||||
|
||||
|
|
|
@ -25,16 +25,13 @@ BEGIN_EVENT_TABLE(DSPConfigDialogHLE, wxDialog)
|
|||
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogHLE::SettingsChanged)
|
||||
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogHLE::SettingsChanged)
|
||||
EVT_CHECKBOX(ID_ENABLE_RE0_FIX, DSPConfigDialogHLE::SettingsChanged)
|
||||
EVT_CHOICE(wxID_ANY, DSPConfigDialogHLE::BackendChanged)
|
||||
EVT_CHOICE(ID_BACKEND, DSPConfigDialogHLE::BackendChanged)
|
||||
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogHLE::VolumeChanged)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
// Center window
|
||||
CenterOnParent();
|
||||
|
||||
m_OK = new wxButton(this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
|
||||
|
@ -94,6 +91,9 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
|
|||
sButtons->Add(m_OK, 0, wxALL, 1);
|
||||
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
|
||||
SetSizerAndFit(sMain);
|
||||
|
||||
// Center window
|
||||
CenterOnParent();
|
||||
}
|
||||
|
||||
// Add audio output options
|
||||
|
|
|
@ -28,7 +28,7 @@ class DSPConfigDialogHLE : public wxDialog
|
|||
{
|
||||
public:
|
||||
DSPConfigDialogHLE(wxWindow *parent,
|
||||
wxWindowID id = 1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("Dolphin DSP-HLE Plugin Settings"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
|
@ -52,7 +52,6 @@ private:
|
|||
|
||||
enum
|
||||
{
|
||||
wxID_OK,
|
||||
ID_ENABLE_HLE_AUDIO,
|
||||
ID_ENABLE_DTK_MUSIC,
|
||||
ID_ENABLE_THROTTLE,
|
||||
|
|
|
@ -99,8 +99,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||
wxUninitialize();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
|
@ -147,12 +145,12 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
|||
_PluginInfo->Version = 0x0100;
|
||||
_PluginInfo->Type = PLUGIN_TYPE_DSP;
|
||||
#ifdef DEBUGFAST
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-HLE Plugin (DebugFast) ");
|
||||
sprintf_s(_PluginInfo->Name, 100, "Dolphin DSP-HLE Plugin (DebugFast) ");
|
||||
#else
|
||||
#ifndef _DEBUG
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-HLE Plugin ");
|
||||
sprintf_s(_PluginInfo->Name, 100, "Dolphin DSP-HLE Plugin ");
|
||||
#else
|
||||
sprintf(_PluginInfo ->Name, "Dolphin DSP-HLE Plugin (Debug) ");
|
||||
sprintf_s(_PluginInfo->Name, 100, "Dolphin DSP-HLE Plugin (Debug) ");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -171,8 +169,6 @@ void DllConfig(HWND _hParent)
|
|||
g_Config.Load();
|
||||
g_Config.GameIniLoad(globals->game_ini);
|
||||
|
||||
if (!m_ConfigFrame)
|
||||
{
|
||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||
m_ConfigFrame = new DSPConfigDialogHLE(frame);
|
||||
|
||||
|
@ -186,13 +182,16 @@ void DllConfig(HWND _hParent)
|
|||
}
|
||||
|
||||
// Only allow one open at a time
|
||||
frame->Disable();
|
||||
m_ConfigFrame->ShowModal();
|
||||
frame->Enable();
|
||||
|
||||
m_ConfigFrame->Destroy();
|
||||
m_ConfigFrame = NULL;
|
||||
#ifdef _WIN32
|
||||
frame->SetHWND(NULL);
|
||||
#endif
|
||||
delete frame;
|
||||
frame->Destroy();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ BEGIN_EVENT_TABLE(DSPConfigDialogLLE, wxDialog)
|
|||
EVT_BUTTON(wxID_OK, DSPConfigDialogLLE::SettingsChanged)
|
||||
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogLLE::SettingsChanged)
|
||||
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogLLE::SettingsChanged)
|
||||
EVT_CHOICE(wxID_ANY, DSPConfigDialogLLE::BackendChanged)
|
||||
EVT_CHOICE(ID_BACKEND, DSPConfigDialogLLE::BackendChanged)
|
||||
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogLLE::VolumeChanged)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
@ -33,9 +33,6 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
|
|||
// Load config settings
|
||||
g_Config.Load();
|
||||
|
||||
// Center window
|
||||
CenterOnParent();
|
||||
|
||||
m_OK = new wxButton(this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
|
||||
|
@ -89,6 +86,8 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
|
|||
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
|
||||
SetSizerAndFit(sMain);
|
||||
|
||||
// Center window
|
||||
CenterOnParent();
|
||||
}
|
||||
|
||||
// Add audio output options
|
||||
|
|
|
@ -28,7 +28,7 @@ class DSPConfigDialogLLE : public wxDialog
|
|||
{
|
||||
public:
|
||||
DSPConfigDialogLLE(wxWindow *parent,
|
||||
wxWindowID id = 1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("Dolphin DSP-LLE Plugin Settings"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
|
@ -50,7 +50,6 @@ private:
|
|||
|
||||
enum
|
||||
{
|
||||
wxID_OK,
|
||||
ID_ENABLE_DTK_MUSIC,
|
||||
ID_ENABLE_THROTTLE,
|
||||
ID_BACKEND,
|
||||
|
|
|
@ -86,8 +86,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||
wxUninitialize();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
|
@ -117,12 +115,12 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
|||
_PluginInfo->Type = PLUGIN_TYPE_DSP;
|
||||
|
||||
#ifdef DEBUGFAST
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (DebugFast)");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (DebugFast)");
|
||||
#else
|
||||
#ifndef _DEBUG
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin DSP-LLE Plugin");
|
||||
#else
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (Debug)");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (Debug)");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -136,8 +134,6 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
|||
void DllConfig(HWND _hParent)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if (!m_ConfigFrame)
|
||||
{
|
||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||
m_ConfigFrame = new DSPConfigDialogLLE(frame);
|
||||
|
||||
|
@ -151,14 +147,16 @@ void DllConfig(HWND _hParent)
|
|||
}
|
||||
|
||||
// Only allow one open at a time
|
||||
frame->Disable();
|
||||
m_ConfigFrame->ShowModal();
|
||||
frame->Enable();
|
||||
|
||||
m_ConfigFrame->Destroy();
|
||||
m_ConfigFrame = NULL;
|
||||
#ifdef _WIN32
|
||||
frame->SetHWND(NULL);
|
||||
#endif
|
||||
delete frame;
|
||||
}
|
||||
frame->Destroy();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
// The wxWidgets class
|
||||
BEGIN_EVENT_TABLE(GCPadConfigDialog,wxDialog)
|
||||
EVT_CLOSE(GCPadConfigDialog::OnClose)
|
||||
EVT_BUTTON(ID_OK, GCPadConfigDialog::OnCloseClick)
|
||||
EVT_BUTTON(ID_CANCEL, GCPadConfigDialog::OnCloseClick)
|
||||
EVT_BUTTON(wxID_OK, GCPadConfigDialog::OnCloseClick)
|
||||
EVT_BUTTON(wxID_CANCEL, GCPadConfigDialog::OnCloseClick)
|
||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, GCPadConfigDialog::NotebookPageChanged)
|
||||
|
||||
EVT_CHOICE(IDC_JOYNAME, GCPadConfigDialog::ChangeSettings)
|
||||
|
@ -178,11 +178,11 @@ void GCPadConfigDialog::OnCloseClick(wxCommandEvent& event)
|
|||
{
|
||||
switch (event.GetId())
|
||||
{
|
||||
case ID_OK:
|
||||
case wxID_OK:
|
||||
g_Config.Save();
|
||||
Close(); // Call OnClose()
|
||||
break;
|
||||
case ID_CANCEL:
|
||||
case wxID_CANCEL:
|
||||
g_Config.Load();
|
||||
Close(); // Call OnClose()
|
||||
break;
|
||||
|
@ -736,9 +736,9 @@ void GCPadConfigDialog::CreateGUIControls()
|
|||
m_Controller[i]->SetSizer(m_sMain[i]);
|
||||
}
|
||||
|
||||
m_OK = new wxButton(this, ID_OK, wxT("OK"));
|
||||
m_OK = new wxButton(this, wxID_OK, wxT("OK"));
|
||||
m_OK->SetToolTip(wxT("Save changes and close"));
|
||||
m_Cancel = new wxButton(this, ID_CANCEL, wxT("Cancel"));
|
||||
m_Cancel = new wxButton(this, wxID_CANCEL, wxT("Cancel"));
|
||||
m_Cancel->SetToolTip(wxT("Discard changes and close"));
|
||||
wxBoxSizer* m_DlgButton = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_DlgButton->AddStretchSpacer();
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
class GCPadConfigDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
GCPadConfigDialog(wxWindow *parent, wxWindowID id = 1,
|
||||
GCPadConfigDialog(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("Gamecube Pad Plugin Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
|
@ -92,9 +92,7 @@ class GCPadConfigDialog : public wxDialog
|
|||
IDB_TRIGGER_L, IDB_TRIGGER_R,
|
||||
|
||||
// Dialog controls
|
||||
ID_OK = 1000,
|
||||
ID_CANCEL,
|
||||
ID_NOTEBOOK,
|
||||
ID_NOTEBOOK = 1000,
|
||||
ID_CONTROLLERPAGE1,
|
||||
ID_CONTROLLERPAGE2,
|
||||
ID_CONTROLLERPAGE3,
|
||||
|
|
|
@ -96,8 +96,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||
wxUninitialize();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
|
@ -163,17 +161,19 @@ void DllConfig(HWND _hParent)
|
|||
}
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if (!m_ConfigFrame)
|
||||
{
|
||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||
m_ConfigFrame = new GCPadConfigDialog(frame);
|
||||
|
||||
frame->Disable();
|
||||
m_ConfigFrame->ShowModal();
|
||||
frame->Enable();
|
||||
|
||||
m_ConfigFrame->Destroy();
|
||||
m_ConfigFrame = NULL;
|
||||
#ifdef _WIN32
|
||||
frame->SetHWND(NULL);
|
||||
#endif
|
||||
delete frame;
|
||||
frame->Destroy();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -109,9 +109,6 @@ struct TabDirect3D : public W32Util::Tab
|
|||
case IDC_WIDESCREEN_HACK:
|
||||
g_Config.bWidescreenHack = Button_GetCheck(GetDlgItem(hDlg, IDC_WIDESCREEN_HACK)) ? true : false;
|
||||
break;
|
||||
case IDC_WIREFRAME:
|
||||
g_Config.bWireFrame = Button_GetCheck(GetDlgItem(hDlg,IDC_WIREFRAME)) ? true : false;
|
||||
break;
|
||||
case IDC_SAFE_TEXTURE_CACHE:
|
||||
g_Config.bSafeTextureCache = Button_GetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE)) == 0 ? false : true;
|
||||
break;
|
||||
|
|
|
@ -351,8 +351,6 @@ bool Renderer::Init()
|
|||
|
||||
void Renderer::Shutdown()
|
||||
{
|
||||
|
||||
|
||||
TeardownDeviceObjects();
|
||||
D3D::EndFrame();
|
||||
D3D::Present();
|
||||
|
@ -674,8 +672,6 @@ static void EFBTextureToD3DBackBuffer(const EFBRectangle& sourceRc)
|
|||
OSD::DrawMessages();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
|
||||
{
|
||||
if (g_bSkipCurrentFrame)
|
||||
|
|
|
@ -150,8 +150,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
|||
wxUninitialize();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
|
@ -201,7 +199,7 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
|
|||
|
||||
void DllAbout(HWND _hParent)
|
||||
{
|
||||
DialogBoxA(g_hInstance,(LPCSTR)IDD_ABOUT,_hParent,(DLGPROC)AboutProc);
|
||||
DialogBox(g_hInstance,(LPCTSTR)IDD_ABOUT,_hParent,(DLGPROC)AboutProc);
|
||||
}
|
||||
|
||||
void DllConfig(HWND _hParent)
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
BEGIN_EVENT_TABLE(GFXConfigDialogOGL,wxDialog)
|
||||
EVT_CLOSE(GFXConfigDialogOGL::OnClose)
|
||||
EVT_BUTTON(ID_CLOSE, GFXConfigDialogOGL::CloseClick)
|
||||
EVT_BUTTON(ID_ABOUTOGL, GFXConfigDialogOGL::AboutClick)
|
||||
EVT_BUTTON(wxID_CLOSE, GFXConfigDialogOGL::CloseClick)
|
||||
EVT_BUTTON(wxID_ABOUT, GFXConfigDialogOGL::AboutClick)
|
||||
EVT_CHECKBOX(ID_FULLSCREEN, GFXConfigDialogOGL::GeneralSettingsChanged)
|
||||
EVT_CHECKBOX(ID_VSYNC, GFXConfigDialogOGL::GeneralSettingsChanged)
|
||||
EVT_CHECKBOX(ID_RENDERTOMAINWINDOW, GFXConfigDialogOGL::GeneralSettingsChanged)
|
||||
|
@ -86,6 +86,7 @@ END_EVENT_TABLE()
|
|||
GFXConfigDialogOGL::GFXConfigDialogOGL(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
CreateGUIControls();
|
||||
}
|
||||
|
||||
|
||||
|
@ -95,6 +96,7 @@ GFXConfigDialogOGL::~GFXConfigDialogOGL()
|
|||
{
|
||||
INFO_LOG(CONSOLE, "GFXConfigDialogOGL Closed");
|
||||
}
|
||||
|
||||
void GFXConfigDialogOGL::OnClose(wxCloseEvent& event)
|
||||
{
|
||||
//INFO_LOG(CONSOLE, "OnClose");
|
||||
|
@ -161,6 +163,7 @@ void GFXConfigDialogOGL::LoadShaders()
|
|||
File::CreateDir(File::GetUserPath(D_SHADERS_IDX));
|
||||
}
|
||||
}
|
||||
|
||||
void GFXConfigDialogOGL::InitializeGUILists()
|
||||
{
|
||||
// Resolutions
|
||||
|
@ -206,6 +209,7 @@ void GFXConfigDialogOGL::InitializeGUILists()
|
|||
arrayStringFor_PhackvalueCB.Add(wxT("Baten Kaitos Origin"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Skies of Arcadia"));
|
||||
}
|
||||
|
||||
void GFXConfigDialogOGL::InitializeGUIValues()
|
||||
{
|
||||
// General Display Settings
|
||||
|
@ -274,6 +278,7 @@ void GFXConfigDialogOGL::InitializeGUIValues()
|
|||
m_PhackvalueCB->SetSelection(g_Config.iPhackvalue);
|
||||
m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
|
||||
}
|
||||
|
||||
void GFXConfigDialogOGL::InitializeGUITooltips()
|
||||
{
|
||||
// Tool tips
|
||||
|
@ -343,6 +348,7 @@ void GFXConfigDialogOGL::InitializeGUITooltips()
|
|||
wxT("\n[This option will apply immediately and does not require a restart. However it may not")
|
||||
wxT(" be entirely safe to change it midgames.]"));
|
||||
}
|
||||
|
||||
void GFXConfigDialogOGL::CreateGUIControls()
|
||||
{
|
||||
InitializeGUILists();
|
||||
|
@ -355,8 +361,8 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
m_Notebook->AddPage(m_PageAdvanced, wxT("Advanced"));
|
||||
|
||||
// Buttons
|
||||
m_About = new wxButton(this, ID_ABOUTOGL, wxT("About"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_About = new wxButton(this, wxID_ABOUT, wxT("About"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
// Put notebook and buttons in sizers
|
||||
wxBoxSizer* sButtons;
|
||||
|
@ -506,7 +512,6 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_PhackvalueCB = new wxChoice(m_PageAdvanced, ID_PHACKVALUE, wxDefaultPosition, wxDefaultSize, arrayStringFor_PhackvalueCB, 0, wxDefaultValidator);
|
||||
|
||||
|
||||
// Sizers
|
||||
sHacks = new wxGridBagSizer(0, 0);
|
||||
sHacks->Add(m_SafeTextureCache, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||
|
@ -567,7 +572,6 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
UpdateGUI();
|
||||
}
|
||||
|
||||
|
||||
void GFXConfigDialogOGL::AboutClick(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
wxMessageBox(wxT("Dolphin OpenGL Plugin\nBy zerofrog(@gmail.com)\n\n")
|
||||
|
@ -684,7 +688,6 @@ void GFXConfigDialogOGL::GeneralSettingsChanged(wxCommandEvent& event)
|
|||
UpdateGUI();
|
||||
}
|
||||
|
||||
|
||||
void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
|
||||
{
|
||||
switch (event.GetId())
|
||||
|
@ -812,5 +815,3 @@ void GFXConfigDialogOGL::UpdateGUI()
|
|||
m_Radio_CopyEFBToGL->Enable(!(g_Config.bEFBCopyDisable));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ enum
|
|||
class GFXConfigDialogOGL : public wxDialog
|
||||
{
|
||||
public:
|
||||
GFXConfigDialogOGL(wxWindow *parent, wxWindowID id = 1,
|
||||
GFXConfigDialogOGL(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
#ifdef DEBUGFAST
|
||||
const wxString &title = wxT("OpenGL (DEBUGFAST) Plugin Configuration"),
|
||||
#else
|
||||
|
@ -150,10 +150,7 @@ class GFXConfigDialogOGL : public wxDialog
|
|||
|
||||
enum
|
||||
{
|
||||
ID_CLOSE = 1000,
|
||||
ID_ABOUTOGL,
|
||||
|
||||
ID_NOTEBOOK,
|
||||
ID_NOTEBOOK = 1000,
|
||||
ID_PAGEGENERAL,
|
||||
ID_PAGEADVANCED,
|
||||
|
||||
|
|
|
@ -69,8 +69,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||
wxUninitialize();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
|
@ -277,7 +275,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
|||
hdc = BeginPaint(hWnd, &ps);
|
||||
EndPaint(hWnd, &ps);
|
||||
}
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case WM_SYSKEYDOWN:
|
||||
switch (LOWORD(wParam))
|
||||
|
@ -287,12 +285,13 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
|||
if (m_hParent == NULL && !g_Config.RenderToMainframe)
|
||||
{
|
||||
ToggleFullscreen(hWnd);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
|
||||
PostMessage(m_hMain, WM_SYSKEYDOWN, wParam, lParam);
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -300,6 +299,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
|||
// Don't process this as a child window to avoid double events
|
||||
if (!g_Config.RenderToMainframe)
|
||||
OnKeyDown(wParam);
|
||||
|
||||
if (g_Config.bFreeLook)
|
||||
FreeLookInput( iMsg, wParam );
|
||||
break;
|
||||
|
||||
/* Post these mouse events to the main window, it's nessesary becase in difference to the
|
||||
|
@ -357,8 +359,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
|||
if( g_Config.bFullscreen )
|
||||
ToggleFullscreen(m_hParent);
|
||||
PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
Shutdown();
|
||||
|
@ -370,17 +372,17 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
case SC_SCREENSAVE:
|
||||
case SC_MONITORPOWER:
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_Config.bFreeLook) {
|
||||
FreeLookInput( iMsg, wParam );
|
||||
}
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// This is called from Create()
|
||||
|
@ -419,7 +421,7 @@ HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const T
|
|||
{
|
||||
// Don't forget to make it NULL, or a broken window will be created in case we
|
||||
// render to main, stop, then render to separate window, as the GUI will still
|
||||
// think we're rendering to main because m_hParent will still contain the old HWND...
|
||||
// think we're rendering to main because m_hParent will still contain the old HWND
|
||||
m_hParent = NULL;
|
||||
m_hMain = parent;
|
||||
|
||||
|
|
|
@ -98,8 +98,6 @@ GFXDebuggerOGL *m_DebuggerFrame = NULL;
|
|||
SVideoInitialize g_VideoInitialize;
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
|
||||
bool allowConfigShow = true;
|
||||
|
||||
// Logging
|
||||
int GLScissorX, GLScissorY, GLScissorW, GLScissorH;
|
||||
|
||||
|
@ -120,11 +118,11 @@ void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
|||
_PluginInfo->Version = 0x0100;
|
||||
_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
|
||||
#ifdef DEBUGFAST
|
||||
sprintf(_PluginInfo->Name, "Dolphin OpenGL (DebugFast)");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin OpenGL (DebugFast)");
|
||||
#elif defined _DEBUG
|
||||
sprintf(_PluginInfo->Name, "Dolphin OpenGL (Debug)");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin OpenGL (Debug)");
|
||||
#else
|
||||
sprintf(_PluginInfo->Name, "Dolphin OpenGL");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin OpenGL");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -169,7 +167,8 @@ void DllDebugger(HWND _hParent, bool Show)
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
void Win32AddResolutions() {
|
||||
void Win32AddResolutions()
|
||||
{
|
||||
// Search for avaliable resolutions
|
||||
|
||||
DWORD iModeNum = 0;
|
||||
|
@ -245,7 +244,6 @@ void CocoaAddResolutions() {
|
|||
int modeIndex;
|
||||
int px = 0, py = 0;
|
||||
|
||||
|
||||
modes = CGDisplayAvailableModes(CGMainDisplayID());
|
||||
|
||||
range.location = 0;
|
||||
|
@ -281,9 +279,6 @@ void DllConfig(HWND _hParent)
|
|||
g_Config.UpdateProjectionHack();
|
||||
UpdateActiveConfig();
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
// Prevent user to show more than 1 config window at same time
|
||||
if (allowConfigShow)
|
||||
{
|
||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||
m_ConfigFrame = new GFXConfigDialogOGL(frame);
|
||||
|
||||
|
@ -295,16 +290,17 @@ void DllConfig(HWND _hParent)
|
|||
CocoaAddResolutions();
|
||||
#endif
|
||||
|
||||
allowConfigShow = false;
|
||||
m_ConfigFrame->CreateGUIControls();
|
||||
allowConfigShow = m_ConfigFrame->ShowModal() == 1 ? true : false;
|
||||
// Prevent user to show more than 1 config window at same time
|
||||
frame->Disable();
|
||||
m_ConfigFrame->ShowModal();
|
||||
frame->Enable();
|
||||
|
||||
m_ConfigFrame->Destroy();
|
||||
m_ConfigFrame = NULL;
|
||||
#ifdef _WIN32
|
||||
frame->SetHWND(NULL);
|
||||
#endif
|
||||
delete frame;
|
||||
}
|
||||
frame->Destroy();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -617,4 +613,3 @@ void Video_WaitForFrameFinish(void)
|
|||
CommandProcessor::WaitForFrameFinish();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -65,8 +65,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||
wxUninitialize();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
|
@ -145,6 +143,8 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
|||
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
|
||||
PostMessage(m_hMain, WM_SYSKEYDOWN, wParam, lParam);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -181,7 +181,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
|||
|
||||
/* To support the separate window rendering we get the message back here. So we basically
|
||||
only let it pass through Dolphin > Frame.cpp to determine if it should be on or off
|
||||
and coordinate it with the other settings if nessesary */
|
||||
and coordinate it with the other settings if necessary */
|
||||
case WM_USER:
|
||||
if (wParam == WM_USER_STOP)
|
||||
SetCursor((lParam) ? hCursor : hCursorBlank);
|
||||
|
@ -189,7 +189,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
|||
PostMessage(m_hMain, WM_USER, wParam, lParam);
|
||||
break;
|
||||
|
||||
/* Post thes mouse events to the main window, it's nessesary becase in difference to the
|
||||
/* Post these mouse events to the main window, it's nessesary becase in difference to the
|
||||
keyboard inputs these events only appear here, not in the main WndProc() */
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_LBUTTONUP:
|
||||
|
@ -218,6 +218,8 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
|||
case SC_SCREENSAVE:
|
||||
case SC_MONITORPOWER:
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
BEGIN_EVENT_TABLE(WiimoteBasicConfigDialog,wxDialog)
|
||||
EVT_CLOSE(WiimoteBasicConfigDialog::OnClose)
|
||||
EVT_BUTTON(ID_OK, WiimoteBasicConfigDialog::ButtonClick)
|
||||
EVT_BUTTON(ID_CANCEL, WiimoteBasicConfigDialog::ButtonClick)
|
||||
EVT_BUTTON(wxID_OK, WiimoteBasicConfigDialog::ButtonClick)
|
||||
EVT_BUTTON(wxID_CANCEL, WiimoteBasicConfigDialog::ButtonClick)
|
||||
EVT_BUTTON(ID_BUTTONMAPPING, WiimoteBasicConfigDialog::ButtonClick)
|
||||
EVT_BUTTON(ID_BUTTONRECORDING, WiimoteBasicConfigDialog::ButtonClick)
|
||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, WiimoteBasicConfigDialog::NotebookPageChanged)
|
||||
|
@ -81,12 +81,12 @@ void WiimoteBasicConfigDialog::ButtonClick(wxCommandEvent& event)
|
|||
{
|
||||
switch(event.GetId())
|
||||
{
|
||||
case ID_OK:
|
||||
case wxID_OK:
|
||||
WiiMoteReal::Allocate();
|
||||
g_Config.Save();
|
||||
Close();
|
||||
break;
|
||||
case ID_CANCEL:
|
||||
case wxID_CANCEL:
|
||||
g_Config.Load();
|
||||
Close();
|
||||
break;
|
||||
|
@ -256,9 +256,9 @@ void WiimoteBasicConfigDialog::CreateGUIControls()
|
|||
m_ButtonMapping = new wxButton(this, ID_BUTTONMAPPING, wxT("Button Mapping"));
|
||||
m_Recording = new wxButton(this, ID_BUTTONRECORDING, wxT("Recording"));
|
||||
|
||||
m_OK = new wxButton(this, ID_OK, wxT("OK"));
|
||||
m_OK = new wxButton(this, wxID_OK, wxT("OK"));
|
||||
m_OK->SetToolTip(wxT("Save changes and close"));
|
||||
m_Cancel = new wxButton(this, ID_CANCEL, wxT("Cancel"));
|
||||
m_Cancel = new wxButton(this, wxID_CANCEL, wxT("Cancel"));
|
||||
m_Cancel->SetToolTip(wxT("Discard changes and close"));
|
||||
|
||||
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
|
|
@ -36,7 +36,7 @@ class WiimoteBasicConfigDialog : public wxDialog
|
|||
{
|
||||
public:
|
||||
WiimoteBasicConfigDialog(wxWindow *parent,
|
||||
wxWindowID id = 1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
|
@ -107,8 +107,6 @@ class WiimoteBasicConfigDialog : public wxDialog
|
|||
|
||||
enum
|
||||
{
|
||||
ID_OK = 1000,
|
||||
ID_CANCEL,
|
||||
ID_BUTTONMAPPING,
|
||||
ID_BUTTONRECORDING,
|
||||
IDTM_SHUTDOWN,
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
BEGIN_EVENT_TABLE(WiimotePadConfigDialog,wxDialog)
|
||||
|
||||
EVT_CLOSE(WiimotePadConfigDialog::OnClose)
|
||||
EVT_BUTTON(ID_CLOSE, WiimotePadConfigDialog::CloseClick)
|
||||
// EVT_BUTTON(ID_APPLY, WiimotePadConfigDialog::CloseClick)
|
||||
EVT_BUTTON(wxID_CLOSE, WiimotePadConfigDialog::CloseClick)
|
||||
// EVT_BUTTON(wxID_APPLY, WiimotePadConfigDialog::CloseClick)
|
||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, WiimotePadConfigDialog::NotebookPageChanged)
|
||||
|
||||
EVT_TIMER(IDTM_BUTTON, WiimotePadConfigDialog::OnButtonTimer)
|
||||
|
@ -182,10 +182,10 @@ void WiimotePadConfigDialog::CloseClick(wxCommandEvent& event)
|
|||
{
|
||||
switch(event.GetId())
|
||||
{
|
||||
case ID_CLOSE:
|
||||
case wxID_CLOSE:
|
||||
Close();
|
||||
break;
|
||||
case ID_APPLY:
|
||||
case wxID_APPLY:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -922,8 +922,8 @@ void WiimotePadConfigDialog::CreatePadGUIControls()
|
|||
m_Controller[i]->SetSizer(m_sMain[i]);
|
||||
}
|
||||
|
||||
// m_Apply = new wxButton(this, ID_APPLY, wxT("Apply"));
|
||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"));
|
||||
// m_Apply = new wxButton(this, wxID_APPLY, wxT("Apply"));
|
||||
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"));
|
||||
|
||||
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
sButtons->AddStretchSpacer();
|
||||
|
|
|
@ -45,7 +45,7 @@ class WiimotePadConfigDialog : public wxDialog
|
|||
{
|
||||
public:
|
||||
WiimotePadConfigDialog(wxWindow *parent,
|
||||
wxWindowID id = 1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
|
@ -120,9 +120,7 @@ class WiimotePadConfigDialog : public wxDialog
|
|||
IDB_ANALOG_RIGHT_X, IDB_ANALOG_RIGHT_Y,
|
||||
IDB_TRIGGER_L, IDB_TRIGGER_R,
|
||||
|
||||
ID_CLOSE = 1000,
|
||||
ID_APPLY,
|
||||
IDTM_BUTTON, // Timer
|
||||
IDTM_BUTTON = 1000, // Timer
|
||||
IDTM_UPDATE_PAD, // Timer
|
||||
|
||||
ID_NOTEBOOK,
|
||||
|
|
|
@ -339,8 +339,8 @@ void WiimoteRecordingConfigDialog::CreateGUIControlsRecording()
|
|||
|
||||
m_PageRecording->SetSizer(m_sRecordingMain);
|
||||
|
||||
m_Apply = new wxButton(this, ID_APPLY, wxT("Apply"));
|
||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"));
|
||||
m_Apply = new wxButton(this, wxID_APPLY, wxT("Apply"));
|
||||
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"));
|
||||
m_Close->SetToolTip(wxT("Apply and Close"));
|
||||
|
||||
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
BEGIN_EVENT_TABLE(WiimoteRecordingConfigDialog,wxDialog)
|
||||
EVT_CLOSE(WiimoteRecordingConfigDialog::OnClose)
|
||||
EVT_BUTTON(ID_CLOSE, WiimoteRecordingConfigDialog::CloseClick)
|
||||
EVT_BUTTON(ID_APPLY, WiimoteRecordingConfigDialog::CloseClick)
|
||||
EVT_BUTTON(wxID_CLOSE, WiimoteRecordingConfigDialog::CloseClick)
|
||||
EVT_BUTTON(wxID_APPLY, WiimoteRecordingConfigDialog::CloseClick)
|
||||
|
||||
EVT_CHOICE(IDC_RECORD + 1, WiimoteRecordingConfigDialog::RecordingChanged)
|
||||
EVT_CHOICE(IDC_RECORD + 2, WiimoteRecordingConfigDialog::RecordingChanged)
|
||||
|
@ -65,8 +65,7 @@ END_EVENT_TABLE()
|
|||
|
||||
WiimoteRecordingConfigDialog::WiimoteRecordingConfigDialog(wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
const wxPoint &position, const wxSize& size, long style)
|
||||
: wxDialog
|
||||
(parent, id, title, position, size, style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
#if wxUSE_TIMER
|
||||
m_TimeoutTimer = new wxTimer(this, IDTM_UPDATE);
|
||||
|
@ -96,13 +95,13 @@ void WiimoteRecordingConfigDialog::CloseClick(wxCommandEvent& event)
|
|||
{
|
||||
switch(event.GetId())
|
||||
{
|
||||
case ID_CLOSE:
|
||||
case wxID_CLOSE:
|
||||
#if HAVE_WIIUSE
|
||||
if (!WiiMoteReal::SafeClose())
|
||||
#endif
|
||||
Close();
|
||||
break;
|
||||
case ID_APPLY:
|
||||
case wxID_APPLY:
|
||||
SaveFile();
|
||||
WiiMoteEmu::LoadRecordedMovements();
|
||||
break;
|
||||
|
|
|
@ -34,7 +34,7 @@ class WiimoteRecordingConfigDialog : public wxDialog
|
|||
{
|
||||
public:
|
||||
WiimoteRecordingConfigDialog(wxWindow *parent,
|
||||
wxWindowID id = 1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
|
@ -103,9 +103,7 @@ class WiimoteRecordingConfigDialog : public wxDialog
|
|||
|
||||
enum
|
||||
{
|
||||
ID_CLOSE = 1000,
|
||||
ID_APPLY,
|
||||
ID_RECORDINGPAGE,
|
||||
ID_RECORDINGPAGE = 1000,
|
||||
IDTM_UPDATE,
|
||||
|
||||
// Real
|
||||
|
|
|
@ -108,8 +108,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||
wxUninitialize();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
|
@ -138,12 +136,12 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
|||
_PluginInfo->Version = 0x0100;
|
||||
_PluginInfo->Type = PLUGIN_TYPE_WIIMOTE;
|
||||
#ifdef DEBUGFAST
|
||||
sprintf(_PluginInfo->Name, "Dolphin Wiimote Plugin (DebugFast)");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin Wiimote Plugin (DebugFast)");
|
||||
#else
|
||||
#ifndef _DEBUG
|
||||
sprintf(_PluginInfo->Name, "Dolphin Wiimote Plugin");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin Wiimote Plugin");
|
||||
#else
|
||||
sprintf(_PluginInfo->Name, "Dolphin Wiimote Plugin (Debug)");
|
||||
sprintf_s(_PluginInfo->Name, "Dolphin Wiimote Plugin (Debug)");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -168,18 +166,19 @@ void DllConfig(HWND _hParent)
|
|||
}
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if (!m_BasicConfigFrame)
|
||||
{
|
||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||
m_BasicConfigFrame = new WiimoteBasicConfigDialog(frame);
|
||||
|
||||
frame->Disable();
|
||||
m_BasicConfigFrame->ShowModal();
|
||||
frame->Enable();
|
||||
|
||||
m_BasicConfigFrame->Destroy();
|
||||
m_BasicConfigFrame = NULL;
|
||||
#ifdef _WIN32
|
||||
frame->SetHWND(NULL);
|
||||
#endif
|
||||
delete frame;
|
||||
}
|
||||
frame->Destroy();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -189,18 +188,11 @@ void Initialize(void *init)
|
|||
g_EmulatorRunning = true;
|
||||
g_WiimoteInitialize = *(SWiimoteInitialize *)init;
|
||||
|
||||
// Update the GUI if the configuration window is already open
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if (m_BasicConfigFrame)
|
||||
{
|
||||
// Save the settings
|
||||
g_Config.Save();
|
||||
// Load the ISO Id
|
||||
g_ISOId = g_WiimoteInitialize.ISOId;
|
||||
// Load the settings
|
||||
g_Config.Load();
|
||||
m_BasicConfigFrame->UpdateGUI();
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
WMdisplay = (Display*)g_WiimoteInitialize.hWnd;
|
||||
|
|
Loading…
Reference in New Issue