From 53c1eedafa2ed2307addcd230b223ac652edee6b Mon Sep 17 00:00:00 2001 From: wowzaman12 Date: Sat, 28 Mar 2015 03:53:07 +0000 Subject: [PATCH] JoypadConfig is now working as it's own separate entity Previously it was using macros that were hardcoded to look for a certain variable git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1264 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/wx/guiinit.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/wx/guiinit.cpp b/src/wx/guiinit.cpp index 16ae2485..1051ad2a 100644 --- a/src/wx/guiinit.cpp +++ b/src/wx/guiinit.cpp @@ -2932,7 +2932,7 @@ bool MainFrame::InitMore(void) getdp("Recordings", gopts.recording_dir); } - d=LoadXRCropertySheetDialog("JoypadConfig"); + wxPropertySheetDialog * joyDialog = LoadXRCropertySheetDialog("JoypadConfig"); wxFarRadio *r = 0; for(int i = 0; i < 4; i++) { wxString pn; @@ -2943,11 +2943,9 @@ bool MainFrame::InitMore(void) // "Unable to load dialog JoypadConfig from resources", this is // probably the reason. pn.Printf(wxT("joy%d"), i + 1); - wxWindow *w; - w=vfld(d, ToString(pn).c_str(), wxWindow); -#define d w + wxWindow *w = vfld(joyDialog, ToString(pn).c_str(), wxWindow); wxFarRadio *cb; - cb=vfld(d, "DefaultConfig", wxFarRadio); + cb=vfld(w, "DefaultConfig", wxFarRadio); if(r) cb->SetGroup(r); else @@ -2971,7 +2969,7 @@ bool MainFrame::InitMore(void) w->Connect(XRCID("Clear"), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(JoyPadConfig_t::JoypadConfigButtons), NULL, &JoyPadConfigHandler[i]); -#undef d + joyDialog->Fit(); } #ifndef NO_LINK