More work on trying to remove C macros
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1269 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
2c3663deff
commit
4a8749e649
|
@ -2486,13 +2486,12 @@ bool MainFrame::InitMore(void)
|
||||||
|
|
||||||
d=LoadXRCDialog("CheatEdit");
|
d=LoadXRCDialog("CheatEdit");
|
||||||
wxChoice *ch;
|
wxChoice *ch;
|
||||||
#define getch(n, o) do { \
|
#define getch(pointer, name, validator)\
|
||||||
ch=vfld(d, n, wxChoice); \
|
ch=vfld(pointer, name, wxChoice); \
|
||||||
ch->SetValidator(wxGenericValidator(&o)); \
|
ch->SetValidator(wxGenericValidator(&validator));
|
||||||
} while(0)
|
|
||||||
{
|
{
|
||||||
// d->Reparent(cheat_list_handler.dlg); // broken
|
// d->Reparent(cheat_list_handler.dlg); // broken
|
||||||
getch("Type", cheat_list_handler.ce_type);
|
getch(d, "Type", cheat_list_handler.ce_type);
|
||||||
cheat_list_handler.ce_type_ch = ch;
|
cheat_list_handler.ce_type_ch = ch;
|
||||||
gettc("Desc", cheat_list_handler.ce_desc);
|
gettc("Desc", cheat_list_handler.ce_desc);
|
||||||
tc->SetMaxLength(sizeof(cheatsList[0].desc) - 1);
|
tc->SetMaxLength(sizeof(cheatsList[0].desc) - 1);
|
||||||
|
@ -2650,7 +2649,7 @@ bool MainFrame::InitMore(void)
|
||||||
d=LoadXRCropertySheetDialog("GameBoyConfig");
|
d=LoadXRCropertySheetDialog("GameBoyConfig");
|
||||||
{
|
{
|
||||||
/// System and Peripherals
|
/// System and Peripherals
|
||||||
getch("System", gbEmulatorType);
|
getch(d, "System", gbEmulatorType);
|
||||||
// "Display borders" corresponds to 2 variables, so it is handled
|
// "Display borders" corresponds to 2 variables, so it is handled
|
||||||
// in command handler. Plus making changes might require resizing
|
// in command handler. Plus making changes might require resizing
|
||||||
// game area. Validation only here.
|
// game area. Validation only here.
|
||||||
|
@ -2724,9 +2723,9 @@ bool MainFrame::InitMore(void)
|
||||||
d=LoadXRCropertySheetDialog("GameBoyAdvanceConfig");
|
d=LoadXRCropertySheetDialog("GameBoyAdvanceConfig");
|
||||||
{
|
{
|
||||||
/// System and peripherals
|
/// System and peripherals
|
||||||
getch("SaveType", gopts.save_type);
|
getch(d, "SaveType", gopts.save_type);
|
||||||
BatConfigHandler.type = ch;
|
BatConfigHandler.type = ch;
|
||||||
getch("FlashSize", gopts.flash_size);
|
getch(d, "FlashSize", gopts.flash_size);
|
||||||
BatConfigHandler.size = ch;
|
BatConfigHandler.size = ch;
|
||||||
d->Connect(XRCID("SaveType"), wxEVT_COMMAND_CHOICE_SELECTED,
|
d->Connect(XRCID("SaveType"), wxEVT_COMMAND_CHOICE_SELECTED,
|
||||||
wxCommandEventHandler(BatConfig_t::ChangeType),
|
wxCommandEventHandler(BatConfig_t::ChangeType),
|
||||||
|
@ -2776,7 +2775,7 @@ bool MainFrame::InitMore(void)
|
||||||
d=LoadXRCropertySheetDialog("DisplayConfig");
|
d=LoadXRCropertySheetDialog("DisplayConfig");
|
||||||
{
|
{
|
||||||
/// On-Screen Display
|
/// On-Screen Display
|
||||||
getch("SpeedIndicator", gopts.osd_speed);
|
getch(d, "SpeedIndicator", gopts.osd_speed);
|
||||||
getcbb("NoStatusMsg", gopts.no_osd_status);
|
getcbb("NoStatusMsg", gopts.no_osd_status);
|
||||||
getcbb("Transparent", gopts.osd_transparent);
|
getcbb("Transparent", gopts.osd_transparent);
|
||||||
|
|
||||||
|
@ -2826,7 +2825,7 @@ bool MainFrame::InitMore(void)
|
||||||
cb=vfld(d, "MMX", wxCheckBox);
|
cb=vfld(d, "MMX", wxCheckBox);
|
||||||
cb->Hide();
|
cb->Hide();
|
||||||
#endif
|
#endif
|
||||||
getch("Filter", gopts.filter);
|
getch(d, "Filter", gopts.filter);
|
||||||
// these two are filled and/or hidden at dialog load time
|
// these two are filled and/or hidden at dialog load time
|
||||||
wxControl *pll;
|
wxControl *pll;
|
||||||
wxChoice *pl;
|
wxChoice *pl;
|
||||||
|
@ -2839,7 +2838,7 @@ bool MainFrame::InitMore(void)
|
||||||
ch->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
|
ch->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
|
||||||
wxCommandEventHandler(PluginEnable_t::ToggleChoice),
|
wxCommandEventHandler(PluginEnable_t::ToggleChoice),
|
||||||
NULL, &PluginEnableHandler);
|
NULL, &PluginEnableHandler);
|
||||||
getch("IFB", gopts.ifb);
|
getch(d, "IFB", gopts.ifb);
|
||||||
}
|
}
|
||||||
|
|
||||||
d=LoadXRCropertySheetDialog("SoundConfig");
|
d=LoadXRCropertySheetDialog("SoundConfig");
|
||||||
|
@ -2855,7 +2854,7 @@ bool MainFrame::InitMore(void)
|
||||||
d->Connect(XRCID("Volume100"), wxEVT_COMMAND_BUTTON_CLICKED,
|
d->Connect(XRCID("Volume100"), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler(SoundConfig_t::FullVol),
|
wxCommandEventHandler(SoundConfig_t::FullVol),
|
||||||
NULL, &sound_config_handler);
|
NULL, &sound_config_handler);
|
||||||
getch("Rate", gopts.sound_qual);
|
getch(d, "Rate", gopts.sound_qual);
|
||||||
|
|
||||||
/// Advanced
|
/// Advanced
|
||||||
#define audapi_rb(n, v) do {\
|
#define audapi_rb(n, v) do {\
|
||||||
|
|
Loading…
Reference in New Issue