JoypadConfig is now working as it's own separate entity
Previously it was using macros that were hardcoded to look for a certain variable
This commit is contained in:
parent
e97c32f5da
commit
bf8098874a
|
@ -2932,7 +2932,7 @@ bool MainFrame::InitMore(void)
|
||||||
getdp("Recordings", gopts.recording_dir);
|
getdp("Recordings", gopts.recording_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
d=LoadXRCropertySheetDialog("JoypadConfig");
|
wxPropertySheetDialog * joyDialog = LoadXRCropertySheetDialog("JoypadConfig");
|
||||||
wxFarRadio *r = 0;
|
wxFarRadio *r = 0;
|
||||||
for(int i = 0; i < 4; i++) {
|
for(int i = 0; i < 4; i++) {
|
||||||
wxString pn;
|
wxString pn;
|
||||||
|
@ -2943,11 +2943,9 @@ bool MainFrame::InitMore(void)
|
||||||
// "Unable to load dialog JoypadConfig from resources", this is
|
// "Unable to load dialog JoypadConfig from resources", this is
|
||||||
// probably the reason.
|
// probably the reason.
|
||||||
pn.Printf(wxT("joy%d"), i + 1);
|
pn.Printf(wxT("joy%d"), i + 1);
|
||||||
wxWindow *w;
|
wxWindow *w = vfld(joyDialog, ToString(pn).c_str(), wxWindow);
|
||||||
w=vfld(d, ToString(pn).c_str(), wxWindow);
|
|
||||||
#define d w
|
|
||||||
wxFarRadio *cb;
|
wxFarRadio *cb;
|
||||||
cb=vfld(d, "DefaultConfig", wxFarRadio);
|
cb=vfld(w, "DefaultConfig", wxFarRadio);
|
||||||
if(r)
|
if(r)
|
||||||
cb->SetGroup(r);
|
cb->SetGroup(r);
|
||||||
else
|
else
|
||||||
|
@ -2971,7 +2969,7 @@ bool MainFrame::InitMore(void)
|
||||||
w->Connect(XRCID("Clear"), wxEVT_COMMAND_BUTTON_CLICKED,
|
w->Connect(XRCID("Clear"), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler(JoyPadConfig_t::JoypadConfigButtons),
|
wxCommandEventHandler(JoyPadConfig_t::JoypadConfigButtons),
|
||||||
NULL, &JoyPadConfigHandler[i]);
|
NULL, &JoyPadConfigHandler[i]);
|
||||||
#undef d
|
joyDialog->Fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_LINK
|
#ifndef NO_LINK
|
||||||
|
|
Loading…
Reference in New Issue