Fixed config settings would not get applied after changing a config and resetting
This commit is contained in:
parent
099df4f93e
commit
9a96d6b2fb
20 changed files with 570 additions and 586 deletions
|
@ -740,7 +740,7 @@ int check_prefs_changed_gfx()
|
|||
|
||||
int lockscr()
|
||||
{
|
||||
if (SDL_MUSTLOCK(screen))
|
||||
if (screen && SDL_MUSTLOCK(screen))
|
||||
SDL_LockSurface(screen);
|
||||
init_row_map();
|
||||
return 1;
|
||||
|
@ -749,7 +749,7 @@ int lockscr()
|
|||
|
||||
void unlockscr()
|
||||
{
|
||||
if (SDL_MUSTLOCK(screen))
|
||||
if (screen && SDL_MUSTLOCK(screen))
|
||||
SDL_UnlockSurface(screen);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#endif
|
||||
|
||||
int emulating = 0;
|
||||
struct uae_prefs workprefs;
|
||||
|
||||
struct gui_msg
|
||||
{
|
||||
|
@ -350,7 +349,7 @@ ConfigFileInfo* SearchConfigInList(const char* name)
|
|||
|
||||
static void clearallkeys (void)
|
||||
{
|
||||
inputdevice_updateconfig (&changed_prefs, &currprefs);
|
||||
inputdevice_updateconfig (NULL, &changed_prefs);
|
||||
}
|
||||
|
||||
void setmouseactive(int active)
|
||||
|
@ -363,40 +362,22 @@ void setmouseactive(int active)
|
|||
}
|
||||
}
|
||||
|
||||
static void prefs_to_gui(struct uae_prefs *p)
|
||||
static void prefs_to_gui()
|
||||
{
|
||||
default_prefs(&workprefs, false, 0);
|
||||
copy_prefs(p, &workprefs);
|
||||
/* filesys hack */
|
||||
changed_prefs.mountitems = currprefs.mountitems;
|
||||
memcpy(&changed_prefs.mountconfig, &currprefs.mountconfig, MOUNT_CONFIG_SIZE * sizeof(struct uaedev_config_info));
|
||||
set_config_changed ();
|
||||
}
|
||||
|
||||
|
||||
static void gui_to_prefs(void)
|
||||
{
|
||||
/* Always copy our prefs to changed_prefs, ... */
|
||||
copy_prefs(&workprefs, &changed_prefs);
|
||||
/* filesys hack */
|
||||
currprefs.mountitems = changed_prefs.mountitems;
|
||||
memcpy(&currprefs.mountconfig, &changed_prefs.mountconfig, MOUNT_CONFIG_SIZE * sizeof(struct uaedev_config_info));
|
||||
fixup_prefs(&changed_prefs, true);
|
||||
}
|
||||
|
||||
static void get_settings(void)
|
||||
{
|
||||
memset (&workprefs, 0, sizeof (struct uae_prefs));
|
||||
prefs_to_gui(&changed_prefs);
|
||||
|
||||
run_gui();
|
||||
gui_to_prefs();
|
||||
|
||||
if(quit_program)
|
||||
screen_is_picasso = 0;
|
||||
|
||||
update_display(&changed_prefs);
|
||||
}
|
||||
|
||||
static void after_leave_gui()
|
||||
{
|
||||
|
@ -428,15 +409,17 @@ int gui_init()
|
|||
if (lstAvailableROMs.empty())
|
||||
RescanROMs();
|
||||
|
||||
get_settings();
|
||||
|
||||
prefs_to_gui();
|
||||
run_gui();
|
||||
gui_to_prefs();
|
||||
if (quit_program < 0)
|
||||
quit_program = -quit_program;
|
||||
if (quit_program == UAE_QUIT)
|
||||
ret = -2; // Quit without start of emulator
|
||||
|
||||
inputdevice_acquire (TRUE);
|
||||
|
||||
update_display(&changed_prefs);
|
||||
|
||||
after_leave_gui();
|
||||
emulating = 1;
|
||||
return ret;
|
||||
|
@ -523,12 +506,15 @@ void gui_display(int shortcut)
|
|||
|
||||
graphics_subshutdown();
|
||||
|
||||
get_settings();
|
||||
prefs_to_gui();
|
||||
run_gui();
|
||||
gui_to_prefs();
|
||||
|
||||
black_screen_now();
|
||||
|
||||
gui_update ();
|
||||
gui_purge_events();
|
||||
update_display(&changed_prefs);
|
||||
|
||||
reset_sound();
|
||||
after_leave_gui();
|
||||
|
|
|
@ -404,7 +404,7 @@ bool CreateFilesysHardfile()
|
|||
ci.controller_media_type = 0;
|
||||
ci.unit_feature_level = 1;
|
||||
ci.readonly = false;
|
||||
const auto uci = add_filesys_config(&workprefs, -1, &ci);
|
||||
const auto uci = add_filesys_config(&changed_prefs, -1, &ci);
|
||||
if (uci)
|
||||
{
|
||||
const auto hfd = get_hardfile_data(uci->configoffset);
|
||||
|
|
|
@ -529,9 +529,9 @@ bool EditFilesysHardfile(const int unit_no)
|
|||
|
||||
if (unit_no >= 0)
|
||||
{
|
||||
uci = &workprefs.mountconfig[unit_no];
|
||||
uci = &changed_prefs.mountconfig[unit_no];
|
||||
const auto ci = &uci->ci;
|
||||
get_filesys_unitconfig(&workprefs, unit_no, &mi);
|
||||
get_filesys_unitconfig(&changed_prefs, unit_no, &mi);
|
||||
|
||||
strdevname.assign(ci->devname);
|
||||
txtDevice->setText(strdevname);
|
||||
|
@ -614,7 +614,7 @@ bool EditFilesysHardfile(const int unit_no)
|
|||
ci.bootpri = bp;
|
||||
ci.physical_geometry = hardfile_testrdb(ci.rootdir);
|
||||
|
||||
uci = add_filesys_config(&workprefs, unit_no, &ci);
|
||||
uci = add_filesys_config(&changed_prefs, unit_no, &ci);
|
||||
if (uci)
|
||||
{
|
||||
const auto hfd = get_hardfile_data(uci->configoffset);
|
||||
|
|
|
@ -357,9 +357,9 @@ bool EditFilesysVirtual(const int unit_no)
|
|||
|
||||
if (unit_no >= 0)
|
||||
{
|
||||
uci = &workprefs.mountconfig[unit_no];
|
||||
uci = &changed_prefs.mountconfig[unit_no];
|
||||
const auto ci = &uci->ci;
|
||||
get_filesys_unitconfig(&workprefs, unit_no, &mi);
|
||||
get_filesys_unitconfig(&changed_prefs, unit_no, &mi);
|
||||
|
||||
strdevname.assign(ci->devname);
|
||||
txtDevice->setText(strdevname);
|
||||
|
@ -407,7 +407,7 @@ bool EditFilesysVirtual(const int unit_no)
|
|||
ci.readonly = !chkReadWrite->isSelected();
|
||||
ci.bootpri = bp;
|
||||
|
||||
uci = add_filesys_config(&workprefs, unit_no, &ci);
|
||||
uci = add_filesys_config(&changed_prefs, unit_no, &ci);
|
||||
if (uci)
|
||||
{
|
||||
filesys_media_change (ci.rootdir, 1, uci);
|
||||
|
|
|
@ -51,45 +51,45 @@ public:
|
|||
{
|
||||
if (actionEvent.getSource() == optCPU68000)
|
||||
{
|
||||
workprefs.cpu_model = 68000;
|
||||
workprefs.fpu_model = 0;
|
||||
workprefs.address_space_24 = true;
|
||||
workprefs.z3fastmem[0].size = 0;
|
||||
workprefs.rtgboards[0].rtgmem_size = 0;
|
||||
workprefs.cachesize = 0;
|
||||
workprefs.compfpu = false;
|
||||
changed_prefs.cpu_model = 68000;
|
||||
changed_prefs.fpu_model = 0;
|
||||
changed_prefs.address_space_24 = true;
|
||||
changed_prefs.z3fastmem[0].size = 0;
|
||||
changed_prefs.rtgboards[0].rtgmem_size = 0;
|
||||
changed_prefs.cachesize = 0;
|
||||
changed_prefs.compfpu = false;
|
||||
}
|
||||
else if (actionEvent.getSource() == optCPU68010)
|
||||
{
|
||||
workprefs.cpu_model = 68010;
|
||||
workprefs.fpu_model = 0;
|
||||
workprefs.address_space_24 = true;
|
||||
workprefs.z3fastmem[0].size = 0;
|
||||
workprefs.rtgboards[0].rtgmem_size = 0;
|
||||
workprefs.cachesize = 0;
|
||||
workprefs.compfpu = false;
|
||||
changed_prefs.cpu_model = 68010;
|
||||
changed_prefs.fpu_model = 0;
|
||||
changed_prefs.address_space_24 = true;
|
||||
changed_prefs.z3fastmem[0].size = 0;
|
||||
changed_prefs.rtgboards[0].rtgmem_size = 0;
|
||||
changed_prefs.cachesize = 0;
|
||||
changed_prefs.compfpu = false;
|
||||
}
|
||||
else if (actionEvent.getSource() == optCPU68020)
|
||||
{
|
||||
workprefs.cpu_model = 68020;
|
||||
if (workprefs.fpu_model == 68040)
|
||||
workprefs.fpu_model = 68881;
|
||||
workprefs.cpu_compatible = false;
|
||||
changed_prefs.cpu_model = 68020;
|
||||
if (changed_prefs.fpu_model == 68040)
|
||||
changed_prefs.fpu_model = 68881;
|
||||
changed_prefs.cpu_compatible = false;
|
||||
}
|
||||
else if (actionEvent.getSource() == optCPU68030)
|
||||
{
|
||||
workprefs.cpu_model = 68030;
|
||||
if (workprefs.fpu_model == 68040)
|
||||
workprefs.fpu_model = 68881;
|
||||
workprefs.address_space_24 = false;
|
||||
workprefs.cpu_compatible = false;
|
||||
changed_prefs.cpu_model = 68030;
|
||||
if (changed_prefs.fpu_model == 68040)
|
||||
changed_prefs.fpu_model = 68881;
|
||||
changed_prefs.address_space_24 = false;
|
||||
changed_prefs.cpu_compatible = false;
|
||||
}
|
||||
else if (actionEvent.getSource() == optCPU68040)
|
||||
{
|
||||
workprefs.cpu_model = 68040;
|
||||
workprefs.fpu_model = 68040;
|
||||
workprefs.address_space_24 = false;
|
||||
workprefs.cpu_compatible = false;
|
||||
changed_prefs.cpu_model = 68040;
|
||||
changed_prefs.fpu_model = 68040;
|
||||
changed_prefs.address_space_24 = false;
|
||||
changed_prefs.cpu_compatible = false;
|
||||
}
|
||||
RefreshPanelCPU();
|
||||
RefreshPanelRAM();
|
||||
|
@ -105,19 +105,19 @@ public:
|
|||
{
|
||||
if (actionEvent.getSource() == optFPUnone)
|
||||
{
|
||||
workprefs.fpu_model = 0;
|
||||
changed_prefs.fpu_model = 0;
|
||||
}
|
||||
else if (actionEvent.getSource() == optFPU68881)
|
||||
{
|
||||
workprefs.fpu_model = 68881;
|
||||
changed_prefs.fpu_model = 68881;
|
||||
}
|
||||
else if (actionEvent.getSource() == optFPU68882)
|
||||
{
|
||||
workprefs.fpu_model = 68882;
|
||||
changed_prefs.fpu_model = 68882;
|
||||
}
|
||||
else if (actionEvent.getSource() == optFPUinternal)
|
||||
{
|
||||
workprefs.fpu_model = 68040;
|
||||
changed_prefs.fpu_model = 68040;
|
||||
}
|
||||
RefreshPanelCPU();
|
||||
RefreshPanelRAM();
|
||||
|
@ -133,15 +133,15 @@ public:
|
|||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == opt7Mhz)
|
||||
workprefs.m68k_speed = M68K_SPEED_7MHZ_CYCLES;
|
||||
changed_prefs.m68k_speed = M68K_SPEED_7MHZ_CYCLES;
|
||||
else if (actionEvent.getSource() == opt14Mhz)
|
||||
workprefs.m68k_speed = M68K_SPEED_14MHZ_CYCLES;
|
||||
changed_prefs.m68k_speed = M68K_SPEED_14MHZ_CYCLES;
|
||||
else if (actionEvent.getSource() == opt28Mhz)
|
||||
workprefs.m68k_speed = M68K_SPEED_25MHZ_CYCLES;
|
||||
changed_prefs.m68k_speed = M68K_SPEED_25MHZ_CYCLES;
|
||||
else if (actionEvent.getSource() == optFastest)
|
||||
workprefs.m68k_speed = -1;
|
||||
changed_prefs.m68k_speed = -1;
|
||||
else if (actionEvent.getSource() == optTurbo)
|
||||
workprefs.m68k_speed = -30;
|
||||
changed_prefs.m68k_speed = -30;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -153,7 +153,7 @@ class CPU24BitActionListener : public gcn::ActionListener
|
|||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
workprefs.address_space_24 = chk24Bit->isSelected();
|
||||
changed_prefs.address_space_24 = chk24Bit->isSelected();
|
||||
RefreshPanelCPU();
|
||||
}
|
||||
};
|
||||
|
@ -167,12 +167,12 @@ public:
|
|||
{
|
||||
if (chkCPUCompatible->isSelected())
|
||||
{
|
||||
workprefs.cpu_compatible = true;
|
||||
workprefs.cachesize = 0;
|
||||
changed_prefs.cpu_compatible = true;
|
||||
changed_prefs.cachesize = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
workprefs.cpu_compatible = false;
|
||||
changed_prefs.cpu_compatible = false;
|
||||
}
|
||||
RefreshPanelCPU();
|
||||
}
|
||||
|
@ -190,19 +190,19 @@ public:
|
|||
{
|
||||
if (chkJIT->isSelected())
|
||||
{
|
||||
workprefs.cpu_compatible = false;
|
||||
workprefs.cachesize = MAX_JIT_CACHE;
|
||||
workprefs.compfpu = true;
|
||||
changed_prefs.cpu_compatible = false;
|
||||
changed_prefs.cachesize = MAX_JIT_CACHE;
|
||||
changed_prefs.compfpu = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
workprefs.cachesize = 0;
|
||||
workprefs.compfpu = false;
|
||||
changed_prefs.cachesize = 0;
|
||||
changed_prefs.compfpu = false;
|
||||
}
|
||||
}
|
||||
else if (actionEvent.getSource() == chkFPUJIT)
|
||||
{
|
||||
workprefs.compfpu = chkFPUJIT->isSelected();
|
||||
changed_prefs.compfpu = chkFPUJIT->isSelected();
|
||||
}
|
||||
RefreshPanelCPU();
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ public:
|
|||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == chkFPUstrict) {
|
||||
workprefs.fpu_strict = chkFPUstrict->isSelected();
|
||||
changed_prefs.fpu_strict = chkFPUstrict->isSelected();
|
||||
|
||||
}
|
||||
RefreshPanelCPU();
|
||||
|
@ -380,25 +380,25 @@ void ExitPanelCPU()
|
|||
|
||||
void RefreshPanelCPU()
|
||||
{
|
||||
if (workprefs.cpu_model == 68000)
|
||||
if (changed_prefs.cpu_model == 68000)
|
||||
optCPU68000->setSelected(true);
|
||||
else if (workprefs.cpu_model == 68010)
|
||||
else if (changed_prefs.cpu_model == 68010)
|
||||
optCPU68010->setSelected(true);
|
||||
else if (workprefs.cpu_model == 68020)
|
||||
else if (changed_prefs.cpu_model == 68020)
|
||||
optCPU68020->setSelected(true);
|
||||
else if (workprefs.cpu_model == 68030)
|
||||
else if (changed_prefs.cpu_model == 68030)
|
||||
optCPU68030->setSelected(true);
|
||||
else if (workprefs.cpu_model == 68040)
|
||||
else if (changed_prefs.cpu_model == 68040)
|
||||
optCPU68040->setSelected(true);
|
||||
|
||||
chk24Bit->setSelected(workprefs.address_space_24);
|
||||
chk24Bit->setEnabled(workprefs.cpu_model == 68020);
|
||||
chkCPUCompatible->setSelected(workprefs.cpu_compatible > 0);
|
||||
chkCPUCompatible->setEnabled(workprefs.cpu_model <= 68010);
|
||||
chkJIT->setEnabled(workprefs.cpu_model > 68010);
|
||||
chkJIT->setSelected(workprefs.cachesize > 0);
|
||||
chk24Bit->setSelected(changed_prefs.address_space_24);
|
||||
chk24Bit->setEnabled(changed_prefs.cpu_model == 68020);
|
||||
chkCPUCompatible->setSelected(changed_prefs.cpu_compatible > 0);
|
||||
chkCPUCompatible->setEnabled(changed_prefs.cpu_model <= 68010);
|
||||
chkJIT->setEnabled(changed_prefs.cpu_model > 68010);
|
||||
chkJIT->setSelected(changed_prefs.cachesize > 0);
|
||||
|
||||
switch (workprefs.fpu_model)
|
||||
switch (changed_prefs.fpu_model)
|
||||
{
|
||||
case 68881:
|
||||
optFPU68881->setSelected(true);
|
||||
|
@ -413,29 +413,29 @@ void RefreshPanelCPU()
|
|||
optFPUnone->setSelected(true);
|
||||
break;
|
||||
}
|
||||
optFPU68881->setEnabled(workprefs.cpu_model >= 68020 && workprefs.cpu_model < 68040);
|
||||
optFPU68882->setEnabled(workprefs.cpu_model >= 68020 && workprefs.cpu_model < 68040);
|
||||
optFPUinternal->setEnabled(workprefs.cpu_model == 68040);
|
||||
optFPU68881->setEnabled(changed_prefs.cpu_model >= 68020 && changed_prefs.cpu_model < 68040);
|
||||
optFPU68882->setEnabled(changed_prefs.cpu_model >= 68020 && changed_prefs.cpu_model < 68040);
|
||||
optFPUinternal->setEnabled(changed_prefs.cpu_model == 68040);
|
||||
|
||||
chkFPUstrict->setSelected(workprefs.fpu_strict);
|
||||
chkFPUstrict->setSelected(changed_prefs.fpu_strict);
|
||||
|
||||
#ifdef USE_JIT_FPU
|
||||
chkFPUJIT->setEnabled(workprefs.cachesize > 0);
|
||||
chkFPUJIT->setSelected(workprefs.compfpu);
|
||||
chkFPUJIT->setEnabled(changed_prefs.cachesize > 0);
|
||||
chkFPUJIT->setSelected(changed_prefs.compfpu);
|
||||
#else
|
||||
chkFPUJIT->setSelected(false);
|
||||
chkFPUJIT->setEnabled(false);
|
||||
#endif
|
||||
|
||||
if (workprefs.m68k_speed == M68K_SPEED_7MHZ_CYCLES)
|
||||
if (changed_prefs.m68k_speed == M68K_SPEED_7MHZ_CYCLES)
|
||||
opt7Mhz->setSelected(true);
|
||||
else if (workprefs.m68k_speed == M68K_SPEED_14MHZ_CYCLES)
|
||||
else if (changed_prefs.m68k_speed == M68K_SPEED_14MHZ_CYCLES)
|
||||
opt14Mhz->setSelected(true);
|
||||
else if (workprefs.m68k_speed == M68K_SPEED_25MHZ_CYCLES)
|
||||
else if (changed_prefs.m68k_speed == M68K_SPEED_25MHZ_CYCLES)
|
||||
opt28Mhz->setSelected(true);
|
||||
else if (workprefs.m68k_speed == -1)
|
||||
else if (changed_prefs.m68k_speed == -1)
|
||||
optFastest->setSelected(true);
|
||||
else if (workprefs.m68k_speed == -30)
|
||||
else if (changed_prefs.m68k_speed == -30)
|
||||
optTurbo->setSelected(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -101,9 +101,9 @@ public:
|
|||
// Chipset selected
|
||||
//---------------------------------------
|
||||
const auto cs = chipsets[cboChipset->getSelected()].compatible;
|
||||
if (workprefs.cs_compatible != cs) {
|
||||
workprefs.cs_compatible = cs;
|
||||
built_in_chipset_prefs(&workprefs);
|
||||
if (changed_prefs.cs_compatible != cs) {
|
||||
changed_prefs.cs_compatible = cs;
|
||||
built_in_chipset_prefs(&changed_prefs);
|
||||
RefreshPanelChipset();
|
||||
}
|
||||
}
|
||||
|
@ -118,13 +118,13 @@ public:
|
|||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optOCS)
|
||||
workprefs.chipset_mask = 0;
|
||||
changed_prefs.chipset_mask = 0;
|
||||
else if (actionEvent.getSource() == optECSAgnus)
|
||||
workprefs.chipset_mask = CSMASK_ECS_AGNUS;
|
||||
changed_prefs.chipset_mask = CSMASK_ECS_AGNUS;
|
||||
else if (actionEvent.getSource() == optECS)
|
||||
workprefs.chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
|
||||
changed_prefs.chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
|
||||
else
|
||||
workprefs.chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE | CSMASK_AGA;
|
||||
changed_prefs.chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE | CSMASK_AGA;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -138,13 +138,13 @@ public:
|
|||
{
|
||||
if (chkNTSC->isSelected())
|
||||
{
|
||||
workprefs.ntscmode = true;
|
||||
workprefs.chipset_refreshrate = 60;
|
||||
changed_prefs.ntscmode = true;
|
||||
changed_prefs.chipset_refreshrate = 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
workprefs.ntscmode = false;
|
||||
workprefs.chipset_refreshrate = 50;
|
||||
changed_prefs.ntscmode = false;
|
||||
changed_prefs.chipset_refreshrate = 50;
|
||||
}
|
||||
RefreshPanelQuickstart();
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ class FastCopperActionListener : public gcn::ActionListener
|
|||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
workprefs.fast_copper = chkFastCopper->isSelected();
|
||||
changed_prefs.fast_copper = chkFastCopper->isSelected();
|
||||
}
|
||||
};
|
||||
static FastCopperActionListener* fastCopperActionListener;
|
||||
|
@ -169,8 +169,8 @@ class BlitterButtonActionListener : public gcn::ActionListener
|
|||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
workprefs.immediate_blits = optBlitImmed->isSelected();
|
||||
workprefs.waiting_blits = optBlitWait->isSelected();
|
||||
changed_prefs.immediate_blits = optBlitImmed->isSelected();
|
||||
changed_prefs.waiting_blits = optBlitWait->isSelected();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -183,13 +183,13 @@ public:
|
|||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optCollNone)
|
||||
workprefs.collision_level = 0;
|
||||
changed_prefs.collision_level = 0;
|
||||
else if (actionEvent.getSource() == optCollSprites)
|
||||
workprefs.collision_level = 1;
|
||||
changed_prefs.collision_level = 1;
|
||||
else if (actionEvent.getSource() == optCollPlayfield)
|
||||
workprefs.collision_level = 2;
|
||||
changed_prefs.collision_level = 2;
|
||||
else
|
||||
workprefs.collision_level = 3;
|
||||
changed_prefs.collision_level = 3;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -350,7 +350,7 @@ void RefreshPanelChipset()
|
|||
bIgnoreListChange = true;
|
||||
auto idx = 0;
|
||||
for (auto i = 0; i<numChipsets; ++i) {
|
||||
if (chipsets[i].compatible == workprefs.cs_compatible) {
|
||||
if (chipsets[i].compatible == changed_prefs.cs_compatible) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
|
@ -358,31 +358,31 @@ void RefreshPanelChipset()
|
|||
cboChipset->setSelected(idx);
|
||||
bIgnoreListChange = false;
|
||||
|
||||
if (workprefs.chipset_mask == 0)
|
||||
if (changed_prefs.chipset_mask == 0)
|
||||
optOCS->setSelected(true);
|
||||
else if (workprefs.chipset_mask == CSMASK_ECS_AGNUS)
|
||||
else if (changed_prefs.chipset_mask == CSMASK_ECS_AGNUS)
|
||||
optECSAgnus->setSelected(true);
|
||||
else if (workprefs.chipset_mask == (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE))
|
||||
else if (changed_prefs.chipset_mask == (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE))
|
||||
optECS->setSelected(true);
|
||||
else if (workprefs.chipset_mask == (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE | CSMASK_AGA))
|
||||
else if (changed_prefs.chipset_mask == (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE | CSMASK_AGA))
|
||||
optAGA->setSelected(true);
|
||||
|
||||
chkNTSC->setSelected(workprefs.ntscmode);
|
||||
chkNTSC->setSelected(changed_prefs.ntscmode);
|
||||
|
||||
if (workprefs.immediate_blits)
|
||||
if (changed_prefs.immediate_blits)
|
||||
optBlitImmed->setSelected(true);
|
||||
else if (workprefs.waiting_blits)
|
||||
else if (changed_prefs.waiting_blits)
|
||||
optBlitWait->setSelected(true);
|
||||
else
|
||||
optBlitNormal->setSelected(true);
|
||||
|
||||
chkFastCopper->setSelected(workprefs.fast_copper);
|
||||
chkFastCopper->setSelected(changed_prefs.fast_copper);
|
||||
|
||||
if (workprefs.collision_level == 0)
|
||||
if (changed_prefs.collision_level == 0)
|
||||
optCollNone->setSelected(true);
|
||||
else if (workprefs.collision_level == 1)
|
||||
else if (changed_prefs.collision_level == 1)
|
||||
optCollSprites->setSelected(true);
|
||||
else if (workprefs.collision_level == 2)
|
||||
else if (changed_prefs.collision_level == 2)
|
||||
optCollPlayfield->setSelected(true);
|
||||
else
|
||||
optCollFull->setSelected(true);
|
||||
|
|
|
@ -48,7 +48,7 @@ bool LoadConfigByName(const char *name)
|
|||
{
|
||||
txtName->setText(config->Name);
|
||||
txtDesc->setText(config->Description);
|
||||
target_cfgfile_load(&workprefs, config->FullPath, 0, 0);
|
||||
target_cfgfile_load(&changed_prefs, config->FullPath, 0, 0);
|
||||
strncpy(last_active_config, config->Name, MAX_DPATH);
|
||||
DisableResume();
|
||||
RefreshAllPanels();
|
||||
|
@ -121,13 +121,13 @@ public:
|
|||
if (emulating)
|
||||
{
|
||||
DisableResume();
|
||||
target_cfgfile_load(&workprefs, ConfigFilesList[i]->FullPath, 0, 0);
|
||||
target_cfgfile_load(&changed_prefs, ConfigFilesList[i]->FullPath, 0, 0);
|
||||
strncpy(last_active_config, ConfigFilesList[i]->Name, MAX_DPATH);
|
||||
RefreshAllPanels();
|
||||
}
|
||||
else
|
||||
{
|
||||
target_cfgfile_load(&workprefs, ConfigFilesList[i]->FullPath, 0, 0);
|
||||
target_cfgfile_load(&changed_prefs, ConfigFilesList[i]->FullPath, 0, 0);
|
||||
strncpy(last_active_config, ConfigFilesList[i]->Name, MAX_DPATH);
|
||||
RefreshAllPanels();
|
||||
}
|
||||
|
@ -143,8 +143,8 @@ public:
|
|||
fetch_configurationpath(filename, MAX_DPATH);
|
||||
strncat(filename, txtName->getText().c_str(), MAX_DPATH - 1);
|
||||
strncat(filename, ".uae", MAX_DPATH - 1);
|
||||
strncpy(workprefs.description, txtDesc->getText().c_str(), 256);
|
||||
if (cfgfile_save(&workprefs, filename, 0))
|
||||
strncpy(changed_prefs.description, txtDesc->getText().c_str(), 256);
|
||||
if (cfgfile_save(&changed_prefs, filename, 0))
|
||||
RefreshPanelConfig();
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ public:
|
|||
//-----------------------------------------------
|
||||
// Second click on selected config -> Load it and start emulation
|
||||
// ----------------------------------------------
|
||||
target_cfgfile_load(&workprefs, ConfigFilesList[selected_item]->FullPath, 0, 0);
|
||||
target_cfgfile_load(&changed_prefs, ConfigFilesList[selected_item]->FullPath, 0, 0);
|
||||
strncpy(last_active_config, ConfigFilesList[selected_item]->Name, MAX_DPATH);
|
||||
|
||||
if (emulating)
|
||||
|
@ -303,7 +303,7 @@ void InitPanelConfig(const struct _ConfigCategory& category)
|
|||
}
|
||||
}
|
||||
txtName->setText(last_active_config);
|
||||
txtDesc->setText(workprefs.description);
|
||||
txtDesc->setText(changed_prefs.description);
|
||||
ensureVisible = -1;
|
||||
RefreshPanelConfig();
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ public:
|
|||
SelectedFunction = 3;
|
||||
|
||||
else if (actionEvent.getSource() == chkAnalogRemap)
|
||||
workprefs.input_analog_remap = chkAnalogRemap->isSelected();
|
||||
changed_prefs.input_analog_remap = chkAnalogRemap->isSelected();
|
||||
|
||||
RefreshPanelCustom();
|
||||
}
|
||||
|
@ -199,16 +199,16 @@ public:
|
|||
switch (SelectedFunction)
|
||||
{
|
||||
case 0:
|
||||
tempmap = workprefs.jports[SelectedPort].amiberry_custom_none;
|
||||
tempmap = changed_prefs.jports[SelectedPort].amiberry_custom_none;
|
||||
break;
|
||||
case 1:
|
||||
tempmap = workprefs.jports[SelectedPort].amiberry_custom_hotkey;
|
||||
tempmap = changed_prefs.jports[SelectedPort].amiberry_custom_hotkey;
|
||||
break;
|
||||
case 2:
|
||||
tempmap = workprefs.jports[SelectedPort].amiberry_custom_left_trigger;
|
||||
tempmap = changed_prefs.jports[SelectedPort].amiberry_custom_left_trigger;
|
||||
break;
|
||||
case 3:
|
||||
tempmap = workprefs.jports[SelectedPort].amiberry_custom_right_trigger;
|
||||
tempmap = changed_prefs.jports[SelectedPort].amiberry_custom_right_trigger;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -297,16 +297,16 @@ public:
|
|||
switch (SelectedFunction)
|
||||
{
|
||||
case 0:
|
||||
workprefs.jports[SelectedPort].amiberry_custom_none = tempmap;
|
||||
changed_prefs.jports[SelectedPort].amiberry_custom_none = tempmap;
|
||||
break;
|
||||
case 1:
|
||||
workprefs.jports[SelectedPort].amiberry_custom_hotkey = tempmap;
|
||||
changed_prefs.jports[SelectedPort].amiberry_custom_hotkey = tempmap;
|
||||
break;
|
||||
case 2:
|
||||
workprefs.jports[SelectedPort].amiberry_custom_left_trigger = tempmap;
|
||||
changed_prefs.jports[SelectedPort].amiberry_custom_left_trigger = tempmap;
|
||||
break;
|
||||
case 3:
|
||||
workprefs.jports[SelectedPort].amiberry_custom_right_trigger = tempmap;
|
||||
changed_prefs.jports[SelectedPort].amiberry_custom_right_trigger = tempmap;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -315,7 +315,7 @@ public:
|
|||
// and here, we will scroll through the custom-map and
|
||||
// push it into the currprefs config file
|
||||
|
||||
inputdevice_updateconfig(nullptr, &workprefs);
|
||||
inputdevice_updateconfig(nullptr, &changed_prefs);
|
||||
RefreshPanelCustom();
|
||||
}
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ void RefreshPanelCustom(void)
|
|||
// optMultiLeft->setSelected(SelectedFunction == 2);
|
||||
// optMultiRight->setSelected(SelectedFunction == 3);
|
||||
|
||||
chkAnalogRemap->setSelected(workprefs.input_analog_remap);
|
||||
chkAnalogRemap->setSelected(changed_prefs.input_analog_remap);
|
||||
|
||||
// you'll want to refresh the drop-down section here
|
||||
// get map
|
||||
|
@ -524,16 +524,16 @@ void RefreshPanelCustom(void)
|
|||
switch (SelectedFunction)
|
||||
{
|
||||
case 0:
|
||||
tempmap = workprefs.jports[SelectedPort].amiberry_custom_none;
|
||||
tempmap = changed_prefs.jports[SelectedPort].amiberry_custom_none;
|
||||
break;
|
||||
case 1:
|
||||
tempmap = workprefs.jports[SelectedPort].amiberry_custom_hotkey;
|
||||
tempmap = changed_prefs.jports[SelectedPort].amiberry_custom_hotkey;
|
||||
break;
|
||||
case 2:
|
||||
tempmap = workprefs.jports[SelectedPort].amiberry_custom_left_trigger;
|
||||
tempmap = changed_prefs.jports[SelectedPort].amiberry_custom_left_trigger;
|
||||
break;
|
||||
case 3:
|
||||
tempmap = workprefs.jports[SelectedPort].amiberry_custom_right_trigger;
|
||||
tempmap = changed_prefs.jports[SelectedPort].amiberry_custom_right_trigger;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -543,9 +543,9 @@ void RefreshPanelCustom(void)
|
|||
// update the joystick port , and disable those which are not available
|
||||
char tmp[255];
|
||||
|
||||
if (workprefs.jports[SelectedPort].id > JSEM_JOYS && workprefs.jports[SelectedPort].id < JSEM_MICE - 1)
|
||||
if (changed_prefs.jports[SelectedPort].id > JSEM_JOYS && changed_prefs.jports[SelectedPort].id < JSEM_MICE - 1)
|
||||
{
|
||||
const auto hostjoyid = workprefs.jports[SelectedPort].id - JSEM_JOYS - 1;
|
||||
const auto hostjoyid = changed_prefs.jports[SelectedPort].id - JSEM_JOYS - 1;
|
||||
#ifdef USE_SDL1
|
||||
strncpy(tmp, SDL_JoystickName(hostjoyid), 255);
|
||||
#elif USE_SDL2
|
||||
|
@ -644,7 +644,7 @@ void RefreshPanelCustom(void)
|
|||
}
|
||||
|
||||
else if (temp_button == host_input_buttons[hostjoyid].quit_button && temp_button != -1 && SelectedFunction == 1 &&
|
||||
workprefs.use_retroarch_quit)
|
||||
changed_prefs.use_retroarch_quit)
|
||||
{
|
||||
cboCustomAction[n]->setListModel(&CustomEventList_Quit);
|
||||
cboCustomAction[n]->setEnabled(false);
|
||||
|
@ -652,7 +652,7 @@ void RefreshPanelCustom(void)
|
|||
}
|
||||
|
||||
else if (temp_button == host_input_buttons[hostjoyid].menu_button && temp_button != -1 && SelectedFunction == 1 &&
|
||||
workprefs.use_retroarch_menu)
|
||||
changed_prefs.use_retroarch_menu)
|
||||
{
|
||||
cboCustomAction[n]->setListModel(&CustomEventList_Menu);
|
||||
cboCustomAction[n]->setEnabled(false);
|
||||
|
@ -660,7 +660,7 @@ void RefreshPanelCustom(void)
|
|||
}
|
||||
|
||||
else if (temp_button == host_input_buttons[hostjoyid].reset_button && temp_button != -1 && SelectedFunction == 1 &&
|
||||
workprefs.use_retroarch_reset)
|
||||
changed_prefs.use_retroarch_reset)
|
||||
{
|
||||
cboCustomAction[n]->setListModel(&CustomEventList_Reset);
|
||||
cboCustomAction[n]->setEnabled(false);
|
||||
|
@ -673,7 +673,7 @@ void RefreshPanelCustom(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (host_input_buttons[hostjoyid].number_of_hats > 0 || workprefs.input_analog_remap == true)
|
||||
if (host_input_buttons[hostjoyid].number_of_hats > 0 || changed_prefs.input_analog_remap == true)
|
||||
{
|
||||
cboCustomAction[ 0]->setEnabled(true);
|
||||
cboCustomAction[ 1]->setEnabled(true);
|
||||
|
|
|
@ -58,45 +58,45 @@ public:
|
|||
{
|
||||
if (actionEvent.getSource() == sldAmigaWidth)
|
||||
{
|
||||
if (workprefs.gfx_monitor.gfx_size.width != amigawidth_values[int(sldAmigaWidth->getValue())])
|
||||
if (changed_prefs.gfx_monitor.gfx_size.width != amigawidth_values[int(sldAmigaWidth->getValue())])
|
||||
{
|
||||
workprefs.gfx_monitor.gfx_size.width = amigawidth_values[int(sldAmigaWidth->getValue())];
|
||||
changed_prefs.gfx_monitor.gfx_size.width = amigawidth_values[int(sldAmigaWidth->getValue())];
|
||||
RefreshPanelDisplay();
|
||||
}
|
||||
}
|
||||
else if (actionEvent.getSource() == sldAmigaHeight)
|
||||
{
|
||||
if (workprefs.gfx_monitor.gfx_size.height != amigaheight_values[int(sldAmigaHeight->getValue())])
|
||||
if (changed_prefs.gfx_monitor.gfx_size.height != amigaheight_values[int(sldAmigaHeight->getValue())])
|
||||
{
|
||||
workprefs.gfx_monitor.gfx_size.height = amigaheight_values[int(sldAmigaHeight->getValue())];
|
||||
changed_prefs.gfx_monitor.gfx_size.height = amigaheight_values[int(sldAmigaHeight->getValue())];
|
||||
RefreshPanelDisplay();
|
||||
}
|
||||
}
|
||||
else if (actionEvent.getSource() == sldVertPos)
|
||||
{
|
||||
if (workprefs.vertical_offset != int(sldVertPos->getValue()) + OFFSET_Y_ADJUST)
|
||||
if (changed_prefs.vertical_offset != int(sldVertPos->getValue()) + OFFSET_Y_ADJUST)
|
||||
{
|
||||
workprefs.vertical_offset = int(sldVertPos->getValue()) + OFFSET_Y_ADJUST;
|
||||
changed_prefs.vertical_offset = int(sldVertPos->getValue()) + OFFSET_Y_ADJUST;
|
||||
RefreshPanelDisplay();
|
||||
}
|
||||
}
|
||||
else if (actionEvent.getSource() == chkFrameskip)
|
||||
workprefs.gfx_framerate = chkFrameskip->isSelected() ? 2 : 1;
|
||||
changed_prefs.gfx_framerate = chkFrameskip->isSelected() ? 2 : 1;
|
||||
|
||||
else if (actionEvent.getSource() == chkAspect)
|
||||
workprefs.gfx_correct_aspect = chkAspect->isSelected();
|
||||
changed_prefs.gfx_correct_aspect = chkAspect->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == chkFullscreen)
|
||||
{
|
||||
if (workprefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN)
|
||||
if (changed_prefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN)
|
||||
{
|
||||
workprefs.gfx_apmode[0].gfx_fullscreen = GFX_WINDOW;
|
||||
workprefs.gfx_apmode[1].gfx_fullscreen = GFX_WINDOW;
|
||||
changed_prefs.gfx_apmode[0].gfx_fullscreen = GFX_WINDOW;
|
||||
changed_prefs.gfx_apmode[1].gfx_fullscreen = GFX_WINDOW;
|
||||
}
|
||||
else
|
||||
{
|
||||
workprefs.gfx_apmode[0].gfx_fullscreen = GFX_FULLSCREEN;
|
||||
workprefs.gfx_apmode[1].gfx_fullscreen = GFX_FULLSCREEN;
|
||||
changed_prefs.gfx_apmode[0].gfx_fullscreen = GFX_FULLSCREEN;
|
||||
changed_prefs.gfx_apmode[1].gfx_fullscreen = GFX_FULLSCREEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -111,11 +111,11 @@ public:
|
|||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optAuto)
|
||||
workprefs.scaling_method = -1;
|
||||
changed_prefs.scaling_method = -1;
|
||||
else if (actionEvent.getSource() == optNearest)
|
||||
workprefs.scaling_method = 0;
|
||||
changed_prefs.scaling_method = 0;
|
||||
else if (actionEvent.getSource() == optLinear)
|
||||
workprefs.scaling_method = 1;
|
||||
changed_prefs.scaling_method = 1;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -129,18 +129,18 @@ public:
|
|||
{
|
||||
if (action_event.getSource() == optSingle)
|
||||
{
|
||||
workprefs.gfx_vresolution = VRES_NONDOUBLE;
|
||||
workprefs.gfx_pscanlines = 0;
|
||||
changed_prefs.gfx_vresolution = VRES_NONDOUBLE;
|
||||
changed_prefs.gfx_pscanlines = 0;
|
||||
}
|
||||
else if (action_event.getSource() == optDouble)
|
||||
{
|
||||
workprefs.gfx_vresolution = VRES_DOUBLE;
|
||||
workprefs.gfx_pscanlines = 0;
|
||||
changed_prefs.gfx_vresolution = VRES_DOUBLE;
|
||||
changed_prefs.gfx_pscanlines = 0;
|
||||
}
|
||||
else if (action_event.getSource() == optScanlines)
|
||||
{
|
||||
workprefs.gfx_vresolution = VRES_DOUBLE;
|
||||
workprefs.gfx_pscanlines = 1;
|
||||
changed_prefs.gfx_vresolution = VRES_DOUBLE;
|
||||
changed_prefs.gfx_pscanlines = 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -320,17 +320,17 @@ void ExitPanelDisplay()
|
|||
|
||||
void RefreshPanelDisplay()
|
||||
{
|
||||
chkFrameskip->setSelected(workprefs.gfx_framerate > 1);
|
||||
chkFrameskip->setSelected(changed_prefs.gfx_framerate > 1);
|
||||
|
||||
int i;
|
||||
char tmp[32];
|
||||
|
||||
for (i = 0; i<6; ++i)
|
||||
{
|
||||
if (workprefs.gfx_monitor.gfx_size.width == amigawidth_values[i])
|
||||
if (changed_prefs.gfx_monitor.gfx_size.width == amigawidth_values[i])
|
||||
{
|
||||
sldAmigaWidth->setValue(i);
|
||||
snprintf(tmp, 32, "%d", workprefs.gfx_monitor.gfx_size.width);
|
||||
snprintf(tmp, 32, "%d", changed_prefs.gfx_monitor.gfx_size.width);
|
||||
lblAmigaWidthInfo->setCaption(tmp);
|
||||
break;
|
||||
}
|
||||
|
@ -338,36 +338,36 @@ void RefreshPanelDisplay()
|
|||
|
||||
for (i = 0; i<6; ++i)
|
||||
{
|
||||
if (workprefs.gfx_monitor.gfx_size.height == amigaheight_values[i])
|
||||
if (changed_prefs.gfx_monitor.gfx_size.height == amigaheight_values[i])
|
||||
{
|
||||
sldAmigaHeight->setValue(i);
|
||||
snprintf(tmp, 32, "%d", workprefs.gfx_monitor.gfx_size.height);
|
||||
snprintf(tmp, 32, "%d", changed_prefs.gfx_monitor.gfx_size.height);
|
||||
lblAmigaHeightInfo->setCaption(tmp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
chkAspect->setSelected(workprefs.gfx_correct_aspect);
|
||||
chkFullscreen->setSelected(workprefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN);
|
||||
chkAspect->setSelected(changed_prefs.gfx_correct_aspect);
|
||||
chkFullscreen->setSelected(changed_prefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN);
|
||||
|
||||
#ifdef USE_SDL2
|
||||
if (workprefs.scaling_method == -1)
|
||||
if (changed_prefs.scaling_method == -1)
|
||||
optAuto->setSelected(true);
|
||||
else if (workprefs.scaling_method == 0)
|
||||
else if (changed_prefs.scaling_method == 0)
|
||||
optNearest->setSelected(true);
|
||||
else if (workprefs.scaling_method == 1)
|
||||
else if (changed_prefs.scaling_method == 1)
|
||||
optLinear->setSelected(true);
|
||||
#endif
|
||||
|
||||
if (workprefs.gfx_vresolution == VRES_NONDOUBLE && workprefs.gfx_pscanlines == 0)
|
||||
if (changed_prefs.gfx_vresolution == VRES_NONDOUBLE && changed_prefs.gfx_pscanlines == 0)
|
||||
optSingle->setSelected(true);
|
||||
else if (workprefs.gfx_vresolution == VRES_DOUBLE && workprefs.gfx_pscanlines == 0)
|
||||
else if (changed_prefs.gfx_vresolution == VRES_DOUBLE && changed_prefs.gfx_pscanlines == 0)
|
||||
optDouble->setSelected(true);
|
||||
else if (workprefs.gfx_vresolution == VRES_DOUBLE && workprefs.gfx_pscanlines == 1)
|
||||
else if (changed_prefs.gfx_vresolution == VRES_DOUBLE && changed_prefs.gfx_pscanlines == 1)
|
||||
optScanlines->setSelected(true);
|
||||
|
||||
sldVertPos->setValue(workprefs.vertical_offset - OFFSET_Y_ADJUST);
|
||||
snprintf(tmp, 32, "%d", workprefs.vertical_offset - OFFSET_Y_ADJUST);
|
||||
sldVertPos->setValue(changed_prefs.vertical_offset - OFFSET_Y_ADJUST);
|
||||
snprintf(tmp, 32, "%d", changed_prefs.vertical_offset - OFFSET_Y_ADJUST);
|
||||
lblVertPosInfo->setCaption(tmp);
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
for (auto i = 0; i < 4; ++i)
|
||||
{
|
||||
if (actionEvent.getSource() == cboDFxType[i])
|
||||
workprefs.floppyslots[i].dfxtype = cboDFxType[i]->getSelected() - 1;
|
||||
changed_prefs.floppyslots[i].dfxtype = cboDFxType[i]->getSelected() - 1;
|
||||
}
|
||||
RefreshPanelFloppy();
|
||||
RefreshPanelQuickstart();
|
||||
|
@ -134,17 +134,17 @@ public:
|
|||
// Drive enabled/disabled
|
||||
//---------------------------------------
|
||||
if (chkDFx[i]->isSelected())
|
||||
workprefs.floppyslots[i].dfxtype = DRV_35_DD;
|
||||
changed_prefs.floppyslots[i].dfxtype = DRV_35_DD;
|
||||
else
|
||||
workprefs.floppyslots[i].dfxtype = DRV_NONE;
|
||||
changed_prefs.floppyslots[i].dfxtype = DRV_NONE;
|
||||
}
|
||||
else if (actionEvent.getSource() == chkDFxWriteProtect[i])
|
||||
{
|
||||
//---------------------------------------
|
||||
// Write-protect changed
|
||||
//---------------------------------------
|
||||
disk_setwriteprotect(&workprefs, i, workprefs.floppyslots[i].df, chkDFxWriteProtect[i]->isSelected());
|
||||
if (disk_getwriteprotect(&workprefs, workprefs.floppyslots[i].df) != chkDFxWriteProtect[i]->isSelected()) {
|
||||
disk_setwriteprotect(&changed_prefs, i, changed_prefs.floppyslots[i].df, chkDFxWriteProtect[i]->isSelected());
|
||||
if (disk_getwriteprotect(&changed_prefs, changed_prefs.floppyslots[i].df) != chkDFxWriteProtect[i]->isSelected()) {
|
||||
// Failed to change write protection -> maybe filesystem doesn't support this
|
||||
chkDFxWriteProtect[i]->setSelected(!chkDFxWriteProtect[i]->isSelected());
|
||||
ShowMessage("Set/Clear write protect", "Failed to change write permission.", "Maybe underlying filesystem doesn't support this.", "Ok", "");
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
//---------------------------------------
|
||||
// Show info about current disk-image
|
||||
//---------------------------------------
|
||||
//if (workprefs.floppyslots[i].dfxtype != DRV_NONE && strlen(workprefs.floppyslots[i].df) > 0)
|
||||
//if (changed_prefs.floppyslots[i].dfxtype != DRV_NONE && strlen(changed_prefs.floppyslots[i].df) > 0)
|
||||
//ToDo: Show info dialog
|
||||
}
|
||||
else if (actionEvent.getSource() == cmdDFxEject[i])
|
||||
|
@ -183,7 +183,7 @@ public:
|
|||
// Eject disk from drive
|
||||
//---------------------------------------
|
||||
disk_eject(i);
|
||||
strncpy(workprefs.floppyslots[i].df, "", MAX_DPATH);
|
||||
strncpy(changed_prefs.floppyslots[i].df, "", MAX_DPATH);
|
||||
AdjustDropDownControls();
|
||||
}
|
||||
else if (actionEvent.getSource() == cmdDFxSelect[i])
|
||||
|
@ -193,15 +193,15 @@ public:
|
|||
//---------------------------------------
|
||||
char tmp[MAX_DPATH];
|
||||
|
||||
if (strlen(workprefs.floppyslots[i].df) > 0)
|
||||
strncpy(tmp, workprefs.floppyslots[i].df, MAX_DPATH);
|
||||
if (strlen(changed_prefs.floppyslots[i].df) > 0)
|
||||
strncpy(tmp, changed_prefs.floppyslots[i].df, MAX_DPATH);
|
||||
else
|
||||
strncpy(tmp, currentDir, MAX_DPATH);
|
||||
if (SelectFile("Select disk image file", tmp, diskfile_filter))
|
||||
{
|
||||
if(strncmp(workprefs.floppyslots[i].df, tmp, MAX_DPATH) != 0)
|
||||
if(strncmp(changed_prefs.floppyslots[i].df, tmp, MAX_DPATH) != 0)
|
||||
{
|
||||
strncpy(workprefs.floppyslots[i].df, tmp, MAX_DPATH);
|
||||
strncpy(changed_prefs.floppyslots[i].df, tmp, MAX_DPATH);
|
||||
disk_insert(i, tmp);
|
||||
AddFileToDiskList(tmp, 1);
|
||||
extractPath(tmp, currentDir);
|
||||
|
@ -209,7 +209,7 @@ public:
|
|||
if (i == 0 && chkLoadConfig->isSelected())
|
||||
{
|
||||
// Search for config of disk
|
||||
extractFileName(workprefs.floppyslots[i].df, tmp);
|
||||
extractFileName(changed_prefs.floppyslots[i].df, tmp);
|
||||
removeFileExtension(tmp);
|
||||
LoadConfigByName(tmp);
|
||||
}
|
||||
|
@ -246,17 +246,17 @@ public:
|
|||
if (idx < 0)
|
||||
{
|
||||
disk_eject(i);
|
||||
strncpy(workprefs.floppyslots[i].df, "", MAX_DPATH);
|
||||
strncpy(changed_prefs.floppyslots[i].df, "", MAX_DPATH);
|
||||
AdjustDropDownControls();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (diskfileList.getElementAt(idx) != workprefs.floppyslots[i].df)
|
||||
if (diskfileList.getElementAt(idx) != changed_prefs.floppyslots[i].df)
|
||||
{
|
||||
strncpy(workprefs.floppyslots[i].df, diskfileList.getElementAt(idx).c_str(), MAX_DPATH);
|
||||
disk_insert(i, workprefs.floppyslots[i].df);
|
||||
strncpy(changed_prefs.floppyslots[i].df, diskfileList.getElementAt(idx).c_str(), MAX_DPATH);
|
||||
disk_insert(i, changed_prefs.floppyslots[i].df);
|
||||
lstMRUDiskList.erase(lstMRUDiskList.begin() + idx);
|
||||
lstMRUDiskList.insert(lstMRUDiskList.begin(), workprefs.floppyslots[i].df);
|
||||
lstMRUDiskList.insert(lstMRUDiskList.begin(), changed_prefs.floppyslots[i].df);
|
||||
bIgnoreListChange = true;
|
||||
cboDFxFile[i]->setSelected(0);
|
||||
bIgnoreListChange = false;
|
||||
|
@ -266,7 +266,7 @@ public:
|
|||
// Search for config of disk
|
||||
char tmp[MAX_DPATH];
|
||||
|
||||
extractFileName(workprefs.floppyslots[i].df, tmp);
|
||||
extractFileName(changed_prefs.floppyslots[i].df, tmp);
|
||||
removeFileExtension(tmp);
|
||||
LoadConfigByName(tmp);
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ class DriveSpeedSliderActionListener : public gcn::ActionListener
|
|||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
workprefs.floppy_speed = drivespeedvalues[int(sldDriveSpeed->getValue())];
|
||||
changed_prefs.floppy_speed = drivespeedvalues[int(sldDriveSpeed->getValue())];
|
||||
RefreshPanelFloppy();
|
||||
}
|
||||
};
|
||||
|
@ -304,20 +304,20 @@ public:
|
|||
//---------------------------------------
|
||||
// Save configuration for current disk
|
||||
//---------------------------------------
|
||||
if (strlen(workprefs.floppyslots[0].df) > 0)
|
||||
if (strlen(changed_prefs.floppyslots[0].df) > 0)
|
||||
{
|
||||
char filename[MAX_DPATH];
|
||||
char diskname[MAX_DPATH];
|
||||
|
||||
extractFileName(workprefs.floppyslots[0].df, diskname);
|
||||
extractFileName(changed_prefs.floppyslots[0].df, diskname);
|
||||
removeFileExtension(diskname);
|
||||
|
||||
fetch_configurationpath(filename, MAX_DPATH);
|
||||
strncat(filename, diskname, MAX_DPATH - 1);
|
||||
strncat(filename, ".uae", MAX_DPATH - 1);
|
||||
|
||||
snprintf(workprefs.description, 256, "Configuration for disk '%s'", diskname);
|
||||
if (cfgfile_save(&workprefs, filename, 0))
|
||||
snprintf(changed_prefs.description, 256, "Configuration for disk '%s'", diskname);
|
||||
if (cfgfile_save(&changed_prefs, filename, 0))
|
||||
RefreshPanelConfig();
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ public:
|
|||
extractFileName(tmp, diskname);
|
||||
removeFileExtension(diskname);
|
||||
diskname[31] = '\0';
|
||||
disk_creatediskfile(&workprefs, tmp, 0, DRV_35_DD, -1, diskname, false, false, nullptr);
|
||||
disk_creatediskfile(&changed_prefs, tmp, 0, DRV_35_DD, -1, diskname, false, false, nullptr);
|
||||
AddFileToDiskList(tmp, 1);
|
||||
extractPath(tmp, currentDir);
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ public:
|
|||
extractFileName(tmp, diskname);
|
||||
removeFileExtension(diskname);
|
||||
diskname[31] = '\0';
|
||||
disk_creatediskfile(&workprefs, tmp, 0, DRV_35_HD, -1, diskname, false, false, nullptr);
|
||||
disk_creatediskfile(&changed_prefs, tmp, 0, DRV_35_HD, -1, diskname, false, false, nullptr);
|
||||
AddFileToDiskList(tmp, 1);
|
||||
extractPath(tmp, currentDir);
|
||||
}
|
||||
|
@ -548,11 +548,11 @@ static void AdjustDropDownControls()
|
|||
{
|
||||
cboDFxFile[i]->clearSelected();
|
||||
|
||||
if (workprefs.floppyslots[i].dfxtype != DRV_NONE && strlen(workprefs.floppyslots[i].df) > 0)
|
||||
if (changed_prefs.floppyslots[i].dfxtype != DRV_NONE && strlen(changed_prefs.floppyslots[i].df) > 0)
|
||||
{
|
||||
for (unsigned int j = 0; j < lstMRUDiskList.size(); ++j)
|
||||
{
|
||||
if (strcmp(lstMRUDiskList[j].c_str(), workprefs.floppyslots[i].df) == 0)
|
||||
if (strcmp(lstMRUDiskList[j].c_str(), changed_prefs.floppyslots[i].df) == 0)
|
||||
{
|
||||
cboDFxFile[i]->setSelected(j);
|
||||
break;
|
||||
|
@ -572,17 +572,17 @@ void RefreshPanelFloppy()
|
|||
|
||||
AdjustDropDownControls();
|
||||
|
||||
workprefs.nr_floppies = 0;
|
||||
changed_prefs.nr_floppies = 0;
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
const auto driveEnabled = workprefs.floppyslots[i].dfxtype != DRV_NONE;
|
||||
const auto driveEnabled = changed_prefs.floppyslots[i].dfxtype != DRV_NONE;
|
||||
chkDFx[i]->setSelected(driveEnabled);
|
||||
cboDFxType[i]->setSelected(workprefs.floppyslots[i].dfxtype + 1);
|
||||
chkDFxWriteProtect[i]->setSelected(disk_getwriteprotect(&workprefs, workprefs.floppyslots[i].df));
|
||||
cboDFxType[i]->setSelected(changed_prefs.floppyslots[i].dfxtype + 1);
|
||||
chkDFxWriteProtect[i]->setSelected(disk_getwriteprotect(&changed_prefs, changed_prefs.floppyslots[i].df));
|
||||
chkDFx[i]->setEnabled(prevAvailable);
|
||||
cboDFxType[i]->setEnabled(prevAvailable);
|
||||
|
||||
chkDFxWriteProtect[i]->setEnabled(driveEnabled && !workprefs.floppy_read_only);
|
||||
chkDFxWriteProtect[i]->setEnabled(driveEnabled && !changed_prefs.floppy_read_only);
|
||||
cmdDFxInfo[i]->setEnabled(driveEnabled);
|
||||
cmdDFxEject[i]->setEnabled(driveEnabled);
|
||||
cmdDFxSelect[i]->setEnabled(driveEnabled);
|
||||
|
@ -590,14 +590,14 @@ void RefreshPanelFloppy()
|
|||
|
||||
prevAvailable = driveEnabled;
|
||||
if (driveEnabled)
|
||||
workprefs.nr_floppies = i + 1;
|
||||
changed_prefs.nr_floppies = i + 1;
|
||||
}
|
||||
|
||||
chkLoadConfig->setSelected(bLoadConfigForDisk);
|
||||
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
if (workprefs.floppy_speed == drivespeedvalues[i])
|
||||
if (changed_prefs.floppy_speed == drivespeedvalues[i])
|
||||
{
|
||||
sldDriveSpeed->setValue(i);
|
||||
lblDriveSpeedInfo->setCaption(drivespeedlist[i]);
|
||||
|
|
|
@ -72,10 +72,10 @@ static int GetHDType(const int index)
|
|||
{
|
||||
struct mountedinfo mi{};
|
||||
|
||||
auto type = get_filesys_unitconfig(&workprefs, index, &mi);
|
||||
auto type = get_filesys_unitconfig(&changed_prefs, index, &mi);
|
||||
if (type < 0)
|
||||
{
|
||||
const auto uci = &workprefs.mountconfig[index];
|
||||
const auto uci = &changed_prefs.mountconfig[index];
|
||||
type = uci->ci.type == UAEDEV_DIR ? FILESYS_VIRTUAL : FILESYS_HARDFILE;
|
||||
}
|
||||
return type;
|
||||
|
@ -113,7 +113,7 @@ public:
|
|||
{
|
||||
if (actionEvent.getSource() == listCmdDelete[i])
|
||||
{
|
||||
kill_filesys_unitconfig(&workprefs, i);
|
||||
kill_filesys_unitconfig(&changed_prefs, i);
|
||||
gui_force_rtarea_hdchange();
|
||||
break;
|
||||
}
|
||||
|
@ -217,15 +217,15 @@ public:
|
|||
{
|
||||
if (actionEvent.getSource() == chkCD)
|
||||
{
|
||||
if (workprefs.cdslots[0].inuse)
|
||||
if (changed_prefs.cdslots[0].inuse)
|
||||
{
|
||||
workprefs.cdslots[0].inuse = false;
|
||||
workprefs.cdslots[0].type = SCSI_UNIT_DISABLED;
|
||||
changed_prefs.cdslots[0].inuse = false;
|
||||
changed_prefs.cdslots[0].type = SCSI_UNIT_DISABLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
workprefs.cdslots[0].inuse = true;
|
||||
workprefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
changed_prefs.cdslots[0].inuse = true;
|
||||
changed_prefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
}
|
||||
RefreshPanelHD();
|
||||
RefreshPanelQuickstart();
|
||||
|
@ -246,25 +246,25 @@ public:
|
|||
//---------------------------------------
|
||||
// Eject CD from drive
|
||||
//---------------------------------------
|
||||
strncpy(workprefs.cdslots[0].name, "", MAX_DPATH);
|
||||
strncpy(changed_prefs.cdslots[0].name, "", MAX_DPATH);
|
||||
AdjustDropDownControls();
|
||||
}
|
||||
else if (actionEvent.getSource() == cmdCDSelect)
|
||||
{
|
||||
char tmp[MAX_DPATH];
|
||||
|
||||
if (strlen(workprefs.cdslots[0].name) > 0)
|
||||
strncpy(tmp, workprefs.cdslots[0].name, MAX_DPATH);
|
||||
if (strlen(changed_prefs.cdslots[0].name) > 0)
|
||||
strncpy(tmp, changed_prefs.cdslots[0].name, MAX_DPATH);
|
||||
else
|
||||
strcpy(tmp, currentDir);
|
||||
|
||||
if (SelectFile("Select CD image file", tmp, cdfile_filter))
|
||||
{
|
||||
if (strncmp(workprefs.cdslots[0].name, tmp, MAX_DPATH) != 0)
|
||||
if (strncmp(changed_prefs.cdslots[0].name, tmp, MAX_DPATH) != 0)
|
||||
{
|
||||
strncpy(workprefs.cdslots[0].name, tmp, sizeof(workprefs.cdslots[0].name));
|
||||
workprefs.cdslots[0].inuse = true;
|
||||
workprefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
strncpy(changed_prefs.cdslots[0].name, tmp, sizeof(changed_prefs.cdslots[0].name));
|
||||
changed_prefs.cdslots[0].inuse = true;
|
||||
changed_prefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
AddFileToCDList(tmp, 1);
|
||||
extractPath(tmp, currentDir);
|
||||
|
||||
|
@ -289,15 +289,15 @@ public:
|
|||
if (actionEvent.getSource() == sldCDVol)
|
||||
{
|
||||
const auto newvol = 100 - int(sldCDVol->getValue());
|
||||
if (workprefs.sound_volume_cd != newvol)
|
||||
if (changed_prefs.sound_volume_cd != newvol)
|
||||
{
|
||||
workprefs.sound_volume_cd = newvol;
|
||||
changed_prefs.sound_volume_cd = newvol;
|
||||
RefreshPanelHD();
|
||||
}
|
||||
}
|
||||
else if (actionEvent.getSource() == chkHDReadOnly)
|
||||
{
|
||||
workprefs.harddrive_read_only = chkHDReadOnly->isSelected();
|
||||
changed_prefs.harddrive_read_only = chkHDReadOnly->isSelected();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -321,18 +321,18 @@ public:
|
|||
|
||||
if (idx < 0)
|
||||
{
|
||||
strncpy(workprefs.cdslots[0].name, "", MAX_DPATH);
|
||||
strncpy(changed_prefs.cdslots[0].name, "", MAX_DPATH);
|
||||
AdjustDropDownControls();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cdfileList.getElementAt(idx) != workprefs.cdslots[0].name)
|
||||
if (cdfileList.getElementAt(idx) != changed_prefs.cdslots[0].name)
|
||||
{
|
||||
strncpy(workprefs.cdslots[0].name, cdfileList.getElementAt(idx).c_str(), sizeof workprefs.cdslots[0].name);
|
||||
workprefs.cdslots[0].inuse = true;
|
||||
workprefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
strncpy(changed_prefs.cdslots[0].name, cdfileList.getElementAt(idx).c_str(), sizeof changed_prefs.cdslots[0].name);
|
||||
changed_prefs.cdslots[0].inuse = true;
|
||||
changed_prefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
lstMRUCDList.erase(lstMRUCDList.begin() + idx);
|
||||
lstMRUCDList.insert(lstMRUCDList.begin(), workprefs.cdslots[0].name);
|
||||
lstMRUCDList.insert(lstMRUCDList.begin(), changed_prefs.cdslots[0].name);
|
||||
bIgnoreListChange = true;
|
||||
cboCDFile->setSelected(0);
|
||||
bIgnoreListChange = false;
|
||||
|
@ -551,11 +551,11 @@ void ExitPanelHD()
|
|||
static void AdjustDropDownControls()
|
||||
{
|
||||
cboCDFile->clearSelected();
|
||||
if (workprefs.cdslots[0].inuse && strlen(workprefs.cdslots[0].name) > 0)
|
||||
if (changed_prefs.cdslots[0].inuse && strlen(changed_prefs.cdslots[0].name) > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < lstMRUCDList.size(); ++i)
|
||||
{
|
||||
if (strcmp(lstMRUCDList[i].c_str(), workprefs.cdslots[0].name) == 0)
|
||||
if (strcmp(lstMRUCDList[i].c_str(), changed_prefs.cdslots[0].name) == 0)
|
||||
{
|
||||
cboCDFile->setSelected(i);
|
||||
break;
|
||||
|
@ -574,11 +574,11 @@ void RefreshPanelHD()
|
|||
|
||||
for (auto row = 0; row < MAX_HD_DEVICES; ++row)
|
||||
{
|
||||
if (row < workprefs.mountitems)
|
||||
if (row < changed_prefs.mountitems)
|
||||
{
|
||||
auto uci = &workprefs.mountconfig[row];
|
||||
auto uci = &changed_prefs.mountconfig[row];
|
||||
const auto ci = &uci->ci;
|
||||
auto type = get_filesys_unitconfig(&workprefs, row, &mi);
|
||||
auto type = get_filesys_unitconfig(&changed_prefs, row, &mi);
|
||||
if (type < 0)
|
||||
{
|
||||
type = uci->ci.type == UAEDEV_DIR ? FILESYS_VIRTUAL : FILESYS_HARDFILE;
|
||||
|
@ -632,16 +632,16 @@ void RefreshPanelHD()
|
|||
}
|
||||
}
|
||||
|
||||
chkHDReadOnly->setSelected(workprefs.harddrive_read_only);
|
||||
chkHDReadOnly->setSelected(changed_prefs.harddrive_read_only);
|
||||
|
||||
chkCD->setSelected(workprefs.cdslots[0].inuse);
|
||||
cmdCDEject->setEnabled(workprefs.cdslots[0].inuse);
|
||||
cmdCDSelect->setEnabled(workprefs.cdslots[0].inuse);
|
||||
cboCDFile->setEnabled(workprefs.cdslots[0].inuse);
|
||||
sldCDVol->setEnabled(workprefs.cdslots[0].inuse);
|
||||
chkCD->setSelected(changed_prefs.cdslots[0].inuse);
|
||||
cmdCDEject->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||
cmdCDSelect->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||
cboCDFile->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||
sldCDVol->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||
|
||||
sldCDVol->setValue(100 - workprefs.sound_volume_cd);
|
||||
snprintf(tmp, 32, "%d %%", 100 - workprefs.sound_volume_cd);
|
||||
sldCDVol->setValue(100 - changed_prefs.sound_volume_cd);
|
||||
snprintf(tmp, 32, "%d %%", 100 - changed_prefs.sound_volume_cd);
|
||||
lblCDVolInfo->setCaption(tmp);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,26 +104,26 @@ public:
|
|||
{
|
||||
if (i == current_port)
|
||||
continue;
|
||||
if (workprefs.jports[i].id == portListIDs[sel])
|
||||
if (changed_prefs.jports[i].id == portListIDs[sel])
|
||||
{
|
||||
workprefs.jports[i].id = JPORT_NONE;
|
||||
workprefs.jports[i].idc.configname[0] = 0;
|
||||
workprefs.jports[i].idc.name[0] = 0;
|
||||
workprefs.jports[i].idc.shortid[0] = 0;
|
||||
changed_prefs.jports[i].id = JPORT_NONE;
|
||||
changed_prefs.jports[i].idc.configname[0] = 0;
|
||||
changed_prefs.jports[i].idc.name[0] = 0;
|
||||
changed_prefs.jports[i].idc.shortid[0] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void set_port(const int sel, const int current_port)
|
||||
{
|
||||
workprefs.jports[current_port].id = portListIDs[sel];
|
||||
if (workprefs.jports[current_port].id == JPORT_NONE)
|
||||
changed_prefs.jports[current_port].id = portListIDs[sel];
|
||||
if (changed_prefs.jports[current_port].id == JPORT_NONE)
|
||||
{
|
||||
workprefs.jports[current_port].idc.configname[0] = 0;
|
||||
workprefs.jports[current_port].idc.name[0] = 0;
|
||||
workprefs.jports[current_port].idc.shortid[0] = 0;
|
||||
changed_prefs.jports[current_port].idc.configname[0] = 0;
|
||||
changed_prefs.jports[current_port].idc.name[0] = 0;
|
||||
changed_prefs.jports[current_port].idc.shortid[0] = 0;
|
||||
}
|
||||
inputdevice_updateconfig(nullptr, &workprefs);
|
||||
inputdevice_updateconfig(nullptr, &changed_prefs);
|
||||
RefreshPanelInput();
|
||||
RefreshPanelCustom();
|
||||
}
|
||||
|
@ -185,30 +185,30 @@ public:
|
|||
else if (actionEvent.getSource() == cboPort0mode)
|
||||
{
|
||||
if (cboPort0mode->getSelected() == 0)
|
||||
workprefs.jports[0].mode = JSEM_MODE_MOUSE;
|
||||
changed_prefs.jports[0].mode = JSEM_MODE_MOUSE;
|
||||
else if (cboPort0mode->getSelected() == 1)
|
||||
workprefs.jports[0].mode = JSEM_MODE_JOYSTICK;
|
||||
changed_prefs.jports[0].mode = JSEM_MODE_JOYSTICK;
|
||||
else if (cboPort0mode->getSelected() == 2)
|
||||
workprefs.jports[0].mode = JSEM_MODE_JOYSTICK_CD32;
|
||||
changed_prefs.jports[0].mode = JSEM_MODE_JOYSTICK_CD32;
|
||||
else
|
||||
workprefs.jports[0].mode = JSEM_MODE_DEFAULT;
|
||||
changed_prefs.jports[0].mode = JSEM_MODE_DEFAULT;
|
||||
|
||||
inputdevice_updateconfig(nullptr, &workprefs);
|
||||
inputdevice_updateconfig(nullptr, &changed_prefs);
|
||||
RefreshPanelInput();
|
||||
RefreshPanelCustom();
|
||||
}
|
||||
else if (actionEvent.getSource() == cboPort1mode)
|
||||
{
|
||||
if (cboPort1mode->getSelected() == 0)
|
||||
workprefs.jports[1].mode = JSEM_MODE_MOUSE;
|
||||
changed_prefs.jports[1].mode = JSEM_MODE_MOUSE;
|
||||
else if (cboPort1mode->getSelected() == 1)
|
||||
workprefs.jports[1].mode = JSEM_MODE_JOYSTICK;
|
||||
changed_prefs.jports[1].mode = JSEM_MODE_JOYSTICK;
|
||||
else if (cboPort1mode->getSelected() == 2)
|
||||
workprefs.jports[1].mode = JSEM_MODE_JOYSTICK_CD32;
|
||||
changed_prefs.jports[1].mode = JSEM_MODE_JOYSTICK_CD32;
|
||||
else
|
||||
workprefs.jports[1].mode = JSEM_MODE_DEFAULT;
|
||||
changed_prefs.jports[1].mode = JSEM_MODE_DEFAULT;
|
||||
|
||||
inputdevice_updateconfig(nullptr, &workprefs);
|
||||
inputdevice_updateconfig(nullptr, &changed_prefs);
|
||||
RefreshPanelInput();
|
||||
RefreshPanelCustom();
|
||||
}
|
||||
|
@ -216,30 +216,30 @@ public:
|
|||
// mousemap drop-down change
|
||||
else if (actionEvent.getSource() == cboPort0mousemode)
|
||||
{
|
||||
workprefs.jports[0].mousemap = cboPort0mousemode->getSelected();
|
||||
inputdevice_updateconfig(nullptr, &workprefs);
|
||||
changed_prefs.jports[0].mousemap = cboPort0mousemode->getSelected();
|
||||
inputdevice_updateconfig(nullptr, &changed_prefs);
|
||||
}
|
||||
else if (actionEvent.getSource() == cboPort1mousemode)
|
||||
{
|
||||
workprefs.jports[1].mousemap = cboPort1mousemode->getSelected();
|
||||
inputdevice_updateconfig(nullptr, &workprefs);
|
||||
changed_prefs.jports[1].mousemap = cboPort1mousemode->getSelected();
|
||||
inputdevice_updateconfig(nullptr, &changed_prefs);
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cboAutofire)
|
||||
{
|
||||
if (cboAutofire->getSelected() == 0)
|
||||
workprefs.input_autofire_linecnt = 0;
|
||||
changed_prefs.input_autofire_linecnt = 0;
|
||||
else if (cboAutofire->getSelected() == 1)
|
||||
workprefs.input_autofire_linecnt = 12 * 312;
|
||||
changed_prefs.input_autofire_linecnt = 12 * 312;
|
||||
else if (cboAutofire->getSelected() == 2)
|
||||
workprefs.input_autofire_linecnt = 8 * 312;
|
||||
changed_prefs.input_autofire_linecnt = 8 * 312;
|
||||
else
|
||||
workprefs.input_autofire_linecnt = 4 * 312;
|
||||
changed_prefs.input_autofire_linecnt = 4 * 312;
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == sldMouseSpeed)
|
||||
{
|
||||
workprefs.input_joymouse_multiplier = mousespeed_values[int(sldMouseSpeed->getValue())];
|
||||
changed_prefs.input_joymouse_multiplier = mousespeed_values[int(sldMouseSpeed->getValue())];
|
||||
RefreshPanelInput();
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ public:
|
|||
else
|
||||
SDL_ANDROID_SetMouseEmulationMode(1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
|
||||
#endif
|
||||
workprefs.input_tablet = chkMouseHack->isSelected() ? TABLET_MOUSEHACK : TABLET_OFF;
|
||||
changed_prefs.input_tablet = chkMouseHack->isSelected() ? TABLET_MOUSEHACK : TABLET_OFF;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -461,7 +461,7 @@ void RefreshPanelInput()
|
|||
auto idx = 0;
|
||||
for (auto i = 0; i < ctrlPortList.getNumberOfElements(); ++i)
|
||||
{
|
||||
if (workprefs.jports[0].id == portListIDs[i])
|
||||
if (changed_prefs.jports[0].id == portListIDs[i])
|
||||
{
|
||||
idx = i;
|
||||
break;
|
||||
|
@ -473,7 +473,7 @@ void RefreshPanelInput()
|
|||
idx = 0;
|
||||
for (auto i = 0; i < ctrlPortList.getNumberOfElements(); ++i)
|
||||
{
|
||||
if (workprefs.jports[1].id == portListIDs[i])
|
||||
if (changed_prefs.jports[1].id == portListIDs[i])
|
||||
{
|
||||
idx = i;
|
||||
break;
|
||||
|
@ -485,7 +485,7 @@ void RefreshPanelInput()
|
|||
idx = 0;
|
||||
for (auto i = 0; i < ctrlPortList.getNumberOfElements(); ++i)
|
||||
{
|
||||
if (workprefs.jports[2].id == portListIDs[i])
|
||||
if (changed_prefs.jports[2].id == portListIDs[i])
|
||||
{
|
||||
idx = i;
|
||||
break;
|
||||
|
@ -497,7 +497,7 @@ void RefreshPanelInput()
|
|||
idx = 0;
|
||||
for (auto i = 0; i < ctrlPortList.getNumberOfElements(); ++i)
|
||||
{
|
||||
if (workprefs.jports[3].id == portListIDs[i])
|
||||
if (changed_prefs.jports[3].id == portListIDs[i])
|
||||
{
|
||||
idx = i;
|
||||
break;
|
||||
|
@ -505,38 +505,38 @@ void RefreshPanelInput()
|
|||
}
|
||||
cboPort3->setSelected(idx);
|
||||
|
||||
if (workprefs.input_autofire_linecnt == 0)
|
||||
if (changed_prefs.input_autofire_linecnt == 0)
|
||||
cboAutofire->setSelected(0);
|
||||
else if (workprefs.input_autofire_linecnt > 10 * 312)
|
||||
else if (changed_prefs.input_autofire_linecnt > 10 * 312)
|
||||
cboAutofire->setSelected(1);
|
||||
else if (workprefs.input_autofire_linecnt > 6 * 312)
|
||||
else if (changed_prefs.input_autofire_linecnt > 6 * 312)
|
||||
cboAutofire->setSelected(2);
|
||||
else
|
||||
cboAutofire->setSelected(3);
|
||||
|
||||
|
||||
if (workprefs.jports[0].mode == JSEM_MODE_MOUSE)
|
||||
if (changed_prefs.jports[0].mode == JSEM_MODE_MOUSE)
|
||||
cboPort0mode->setSelected(0);
|
||||
else if (workprefs.jports[0].mode == JSEM_MODE_JOYSTICK)
|
||||
else if (changed_prefs.jports[0].mode == JSEM_MODE_JOYSTICK)
|
||||
cboPort0mode->setSelected(1);
|
||||
else if (workprefs.jports[0].mode == JSEM_MODE_JOYSTICK_CD32)
|
||||
else if (changed_prefs.jports[0].mode == JSEM_MODE_JOYSTICK_CD32)
|
||||
cboPort0mode->setSelected(2);
|
||||
else
|
||||
cboPort0mode->setSelected(3);
|
||||
|
||||
|
||||
if (workprefs.jports[1].mode == JSEM_MODE_MOUSE)
|
||||
if (changed_prefs.jports[1].mode == JSEM_MODE_MOUSE)
|
||||
cboPort1mode->setSelected(0);
|
||||
else if (workprefs.jports[1].mode == JSEM_MODE_JOYSTICK)
|
||||
else if (changed_prefs.jports[1].mode == JSEM_MODE_JOYSTICK)
|
||||
cboPort1mode->setSelected(1);
|
||||
else if (workprefs.jports[1].mode == JSEM_MODE_JOYSTICK_CD32)
|
||||
else if (changed_prefs.jports[1].mode == JSEM_MODE_JOYSTICK_CD32)
|
||||
cboPort1mode->setSelected(2);
|
||||
else
|
||||
cboPort1mode->setSelected(3);
|
||||
|
||||
// changed mouse map
|
||||
cboPort0mousemode->setSelected(workprefs.jports[0].mousemap);
|
||||
cboPort1mousemode->setSelected(workprefs.jports[1].mousemap);
|
||||
cboPort0mousemode->setSelected(changed_prefs.jports[0].mousemap);
|
||||
cboPort1mousemode->setSelected(changed_prefs.jports[1].mousemap);
|
||||
|
||||
if (cboPort0mode->getSelected() == 0)
|
||||
{
|
||||
|
@ -558,7 +558,7 @@ void RefreshPanelInput()
|
|||
|
||||
for (auto i = 0; i < 5; ++i)
|
||||
{
|
||||
if (workprefs.input_joymouse_multiplier == mousespeed_values[i])
|
||||
if (changed_prefs.input_joymouse_multiplier == mousespeed_values[i])
|
||||
{
|
||||
sldMouseSpeed->setValue(i);
|
||||
lblMouseSpeedInfo->setCaption(mousespeed_list[i]);
|
||||
|
@ -566,7 +566,7 @@ void RefreshPanelInput()
|
|||
}
|
||||
}
|
||||
|
||||
chkMouseHack->setSelected(workprefs.input_tablet == TABLET_MOUSEHACK);
|
||||
chkMouseHack->setSelected(changed_prefs.input_tablet == TABLET_MOUSEHACK);
|
||||
}
|
||||
|
||||
bool HelpPanelInput(std::vector<std::string> &helptext)
|
||||
|
|
|
@ -85,49 +85,49 @@ public:
|
|||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == chkStatusLine)
|
||||
workprefs.leds_on_screen = chkStatusLine->isSelected();
|
||||
changed_prefs.leds_on_screen = chkStatusLine->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == chkHideIdleLed)
|
||||
workprefs.hide_idle_led = chkHideIdleLed->isSelected();
|
||||
changed_prefs.hide_idle_led = chkHideIdleLed->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == chkShowGUI)
|
||||
workprefs.start_gui = chkShowGUI->isSelected();
|
||||
changed_prefs.start_gui = chkShowGUI->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == chkRetroArchQuit)
|
||||
{
|
||||
workprefs.use_retroarch_quit = chkRetroArchQuit->isSelected();
|
||||
changed_prefs.use_retroarch_quit = chkRetroArchQuit->isSelected();
|
||||
RefreshPanelCustom();
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == chkRetroArchMenu)
|
||||
{
|
||||
workprefs.use_retroarch_menu = chkRetroArchMenu->isSelected();
|
||||
changed_prefs.use_retroarch_menu = chkRetroArchMenu->isSelected();
|
||||
RefreshPanelCustom();
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == chkRetroArchReset)
|
||||
{
|
||||
workprefs.use_retroarch_reset = chkRetroArchReset->isSelected();
|
||||
changed_prefs.use_retroarch_reset = chkRetroArchReset->isSelected();
|
||||
RefreshPanelCustom();
|
||||
}
|
||||
|
||||
// else if (actionEvent.getSource() == chkRetroArchSavestate)
|
||||
// workprefs.amiberry_use_retroarch_savestatebuttons = chkRetroArchSavestate->isSelected();
|
||||
// changed_prefs.amiberry_use_retroarch_savestatebuttons = chkRetroArchSavestate->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == chkBSDSocket)
|
||||
workprefs.socket_emu = chkBSDSocket->isSelected();
|
||||
changed_prefs.socket_emu = chkBSDSocket->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == chkMasterWP) {
|
||||
workprefs.floppy_read_only = chkMasterWP->isSelected();
|
||||
changed_prefs.floppy_read_only = chkMasterWP->isSelected();
|
||||
RefreshPanelQuickstart();
|
||||
RefreshPanelFloppy();
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cboKBDLed_num)
|
||||
workprefs.kbd_led_num = cboKBDLed_num->getSelected();
|
||||
changed_prefs.kbd_led_num = cboKBDLed_num->getSelected();
|
||||
|
||||
else if (actionEvent.getSource() == cboKBDLed_scr)
|
||||
workprefs.kbd_led_scr = cboKBDLed_scr->getSelected();
|
||||
changed_prefs.kbd_led_scr = cboKBDLed_scr->getSelected();
|
||||
|
||||
else if (actionEvent.getSource() == cmdOpenGUI)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ public:
|
|||
if (key != nullptr)
|
||||
{
|
||||
txtOpenGUI->setText(key);
|
||||
strcpy(workprefs.open_gui, key);
|
||||
strcpy(changed_prefs.open_gui, key);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ public:
|
|||
if (key != nullptr)
|
||||
{
|
||||
txtKeyForQuit->setText(key);
|
||||
strcpy(workprefs.quit_amiberry, key);
|
||||
strcpy(changed_prefs.quit_amiberry, key);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ public:
|
|||
if (key != nullptr)
|
||||
{
|
||||
txtKeyActionReplay->setText(key);
|
||||
strcpy(workprefs.action_replay, key);
|
||||
strcpy(changed_prefs.action_replay, key);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
if (key != nullptr)
|
||||
{
|
||||
txtKeyFullScreen->setText(key);
|
||||
strcpy(workprefs.fullscreen_toggle, key);
|
||||
strcpy(changed_prefs.fullscreen_toggle, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -372,25 +372,25 @@ void ExitPanelMisc()
|
|||
|
||||
void RefreshPanelMisc()
|
||||
{
|
||||
chkStatusLine->setSelected(workprefs.leds_on_screen);
|
||||
chkHideIdleLed->setSelected(workprefs.hide_idle_led);
|
||||
chkShowGUI->setSelected(workprefs.start_gui);
|
||||
chkStatusLine->setSelected(changed_prefs.leds_on_screen);
|
||||
chkHideIdleLed->setSelected(changed_prefs.hide_idle_led);
|
||||
chkShowGUI->setSelected(changed_prefs.start_gui);
|
||||
|
||||
chkRetroArchQuit->setSelected(workprefs.use_retroarch_quit);
|
||||
chkRetroArchMenu->setSelected(workprefs.use_retroarch_menu);
|
||||
chkRetroArchReset->setSelected(workprefs.use_retroarch_reset);
|
||||
//chkRetroArchSavestate->setSelected(workprefs.use_retroarch_statebuttons);
|
||||
chkRetroArchQuit->setSelected(changed_prefs.use_retroarch_quit);
|
||||
chkRetroArchMenu->setSelected(changed_prefs.use_retroarch_menu);
|
||||
chkRetroArchReset->setSelected(changed_prefs.use_retroarch_reset);
|
||||
//chkRetroArchSavestate->setSelected(changed_prefs.use_retroarch_statebuttons);
|
||||
|
||||
chkBSDSocket->setSelected(workprefs.socket_emu);
|
||||
chkMasterWP->setSelected(workprefs.floppy_read_only);
|
||||
chkBSDSocket->setSelected(changed_prefs.socket_emu);
|
||||
chkMasterWP->setSelected(changed_prefs.floppy_read_only);
|
||||
|
||||
cboKBDLed_num->setSelected(workprefs.kbd_led_num);
|
||||
cboKBDLed_scr->setSelected(workprefs.kbd_led_scr);
|
||||
cboKBDLed_num->setSelected(changed_prefs.kbd_led_num);
|
||||
cboKBDLed_scr->setSelected(changed_prefs.kbd_led_scr);
|
||||
|
||||
txtOpenGUI->setText(strncmp(workprefs.open_gui, "", 1) != 0 ? workprefs.open_gui : "Click to map");
|
||||
txtKeyForQuit->setText(strncmp(workprefs.quit_amiberry, "", 1) != 0 ? workprefs.quit_amiberry : "Click to map");
|
||||
txtKeyActionReplay->setText(strncmp(workprefs.action_replay, "", 1) != 0 ? workprefs.action_replay : "Click to map");
|
||||
txtKeyFullScreen->setText(strncmp(workprefs.fullscreen_toggle, "", 1) != 0 ? workprefs.fullscreen_toggle : "Click to map");
|
||||
txtOpenGUI->setText(strncmp(changed_prefs.open_gui, "", 1) != 0 ? changed_prefs.open_gui : "Click to map");
|
||||
txtKeyForQuit->setText(strncmp(changed_prefs.quit_amiberry, "", 1) != 0 ? changed_prefs.quit_amiberry : "Click to map");
|
||||
txtKeyActionReplay->setText(strncmp(changed_prefs.action_replay, "", 1) != 0 ? changed_prefs.action_replay : "Click to map");
|
||||
txtKeyFullScreen->setText(strncmp(changed_prefs.fullscreen_toggle, "", 1) != 0 ? changed_prefs.fullscreen_toggle : "Click to map");
|
||||
}
|
||||
|
||||
bool HelpPanelMisc(std::vector<std::string> &helptext)
|
||||
|
|
|
@ -48,74 +48,74 @@ class OnScreenActionListener : public gcn::ActionListener
|
|||
{
|
||||
if (actionEvent.getSource() == checkBox_onscreen_control) {
|
||||
if (checkBox_onscreen_control->isSelected())
|
||||
workprefs.onScreen=1;
|
||||
changed_prefs.onScreen=1;
|
||||
else
|
||||
workprefs.onScreen=0;
|
||||
changed_prefs.onScreen=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_textinput) {
|
||||
if (checkBox_onscreen_textinput->isSelected())
|
||||
workprefs.onScreen_textinput=1;
|
||||
changed_prefs.onScreen_textinput=1;
|
||||
else
|
||||
workprefs.onScreen_textinput=0;
|
||||
changed_prefs.onScreen_textinput=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_dpad) {
|
||||
if (checkBox_onscreen_dpad->isSelected())
|
||||
workprefs.onScreen_dpad=1;
|
||||
changed_prefs.onScreen_dpad=1;
|
||||
else
|
||||
workprefs.onScreen_dpad=0;
|
||||
changed_prefs.onScreen_dpad=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_button1) {
|
||||
if (checkBox_onscreen_button1->isSelected())
|
||||
workprefs.onScreen_button1=1;
|
||||
changed_prefs.onScreen_button1=1;
|
||||
else
|
||||
workprefs.onScreen_button1=0;
|
||||
changed_prefs.onScreen_button1=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_button2) {
|
||||
if (checkBox_onscreen_button2->isSelected())
|
||||
workprefs.onScreen_button2=1;
|
||||
changed_prefs.onScreen_button2=1;
|
||||
else
|
||||
workprefs.onScreen_button2=0;
|
||||
changed_prefs.onScreen_button2=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_button3) {
|
||||
if (checkBox_onscreen_button3->isSelected())
|
||||
workprefs.onScreen_button3=1;
|
||||
changed_prefs.onScreen_button3=1;
|
||||
else
|
||||
workprefs.onScreen_button3=0;
|
||||
changed_prefs.onScreen_button3=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_button4) {
|
||||
if (checkBox_onscreen_button4->isSelected())
|
||||
workprefs.onScreen_button4=1;
|
||||
changed_prefs.onScreen_button4=1;
|
||||
else
|
||||
workprefs.onScreen_button4=0;
|
||||
changed_prefs.onScreen_button4=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_button5) {
|
||||
if (checkBox_onscreen_button5->isSelected())
|
||||
workprefs.onScreen_button5=1;
|
||||
changed_prefs.onScreen_button5=1;
|
||||
else
|
||||
workprefs.onScreen_button5=0;
|
||||
changed_prefs.onScreen_button5=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_button6) {
|
||||
if (checkBox_onscreen_button6->isSelected())
|
||||
workprefs.onScreen_button6=1;
|
||||
changed_prefs.onScreen_button6=1;
|
||||
else
|
||||
workprefs.onScreen_button6=0;
|
||||
changed_prefs.onScreen_button6=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_onscreen_custompos) {
|
||||
if (checkBox_onscreen_custompos->isSelected())
|
||||
workprefs.custom_position=1;
|
||||
changed_prefs.custom_position=1;
|
||||
else
|
||||
workprefs.custom_position=0;
|
||||
changed_prefs.custom_position=0;
|
||||
}
|
||||
if (actionEvent.getSource() == checkBox_floatingJoystick)
|
||||
if (checkBox_floatingJoystick->isSelected())
|
||||
workprefs.floatingJoystick=1;
|
||||
changed_prefs.floatingJoystick=1;
|
||||
else
|
||||
workprefs.floatingJoystick=0;
|
||||
changed_prefs.floatingJoystick=0;
|
||||
if (actionEvent.getSource() == checkBox_disableMenuVKeyb)
|
||||
if (checkBox_disableMenuVKeyb->isSelected())
|
||||
workprefs.disableMenuVKeyb=1;
|
||||
changed_prefs.disableMenuVKeyb=1;
|
||||
else
|
||||
workprefs.disableMenuVKeyb=0;
|
||||
changed_prefs.disableMenuVKeyb=0;
|
||||
RefreshPanelOnScreen();
|
||||
}
|
||||
};
|
||||
|
@ -137,41 +137,41 @@ class WindowPosButtonActionListener : public gcn::ActionListener
|
|||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent) {
|
||||
if (actionEvent.getSource() == button_onscreen_ok) {
|
||||
workprefs.pos_x_textinput = window_pos_textinput->getX();
|
||||
workprefs.pos_y_textinput = window_pos_textinput->getY();
|
||||
workprefs.pos_x_dpad = window_pos_dpad->getX();
|
||||
workprefs.pos_y_dpad = window_pos_dpad->getY();
|
||||
workprefs.pos_x_button1 = window_pos_button1->getX();
|
||||
workprefs.pos_y_button1 = window_pos_button1->getY();
|
||||
workprefs.pos_x_button2 = window_pos_button2->getX();
|
||||
workprefs.pos_y_button2 = window_pos_button2->getY();
|
||||
workprefs.pos_x_button3 = window_pos_button3->getX();
|
||||
workprefs.pos_y_button3 = window_pos_button3->getY();
|
||||
workprefs.pos_x_button4 = window_pos_button4->getX();
|
||||
workprefs.pos_y_button4 = window_pos_button4->getY();
|
||||
workprefs.pos_x_button5 = window_pos_button5->getX();
|
||||
workprefs.pos_y_button5 = window_pos_button5->getY();
|
||||
workprefs.pos_x_button6 = window_pos_button6->getX();
|
||||
workprefs.pos_y_button6 = window_pos_button6->getY();
|
||||
changed_prefs.pos_x_textinput = window_pos_textinput->getX();
|
||||
changed_prefs.pos_y_textinput = window_pos_textinput->getY();
|
||||
changed_prefs.pos_x_dpad = window_pos_dpad->getX();
|
||||
changed_prefs.pos_y_dpad = window_pos_dpad->getY();
|
||||
changed_prefs.pos_x_button1 = window_pos_button1->getX();
|
||||
changed_prefs.pos_y_button1 = window_pos_button1->getY();
|
||||
changed_prefs.pos_x_button2 = window_pos_button2->getX();
|
||||
changed_prefs.pos_y_button2 = window_pos_button2->getY();
|
||||
changed_prefs.pos_x_button3 = window_pos_button3->getX();
|
||||
changed_prefs.pos_y_button3 = window_pos_button3->getY();
|
||||
changed_prefs.pos_x_button4 = window_pos_button4->getX();
|
||||
changed_prefs.pos_y_button4 = window_pos_button4->getY();
|
||||
changed_prefs.pos_x_button5 = window_pos_button5->getX();
|
||||
changed_prefs.pos_y_button5 = window_pos_button5->getY();
|
||||
changed_prefs.pos_x_button6 = window_pos_button6->getX();
|
||||
changed_prefs.pos_y_button6 = window_pos_button6->getY();
|
||||
window_setup_position->setVisible(false);
|
||||
}
|
||||
if (actionEvent.getSource() == button_onscreen_reset) {
|
||||
workprefs.pos_x_textinput = 0;
|
||||
workprefs.pos_y_textinput = 0;
|
||||
workprefs.pos_x_dpad = 4;
|
||||
workprefs.pos_y_dpad = 215;
|
||||
workprefs.pos_x_button1 = 430;
|
||||
workprefs.pos_y_button1 = 286;
|
||||
workprefs.pos_x_button2 = 378;
|
||||
workprefs.pos_y_button2 = 286;
|
||||
workprefs.pos_x_button3 = 430;
|
||||
workprefs.pos_y_button3 = 214;
|
||||
workprefs.pos_x_button4 = 378;
|
||||
workprefs.pos_y_button4 = 214;
|
||||
workprefs.pos_x_button5 = 430;
|
||||
workprefs.pos_y_button5 = 142;
|
||||
workprefs.pos_x_button6 = 378;
|
||||
workprefs.pos_y_button6 = 142;
|
||||
changed_prefs.pos_x_textinput = 0;
|
||||
changed_prefs.pos_y_textinput = 0;
|
||||
changed_prefs.pos_x_dpad = 4;
|
||||
changed_prefs.pos_y_dpad = 215;
|
||||
changed_prefs.pos_x_button1 = 430;
|
||||
changed_prefs.pos_y_button1 = 286;
|
||||
changed_prefs.pos_x_button2 = 378;
|
||||
changed_prefs.pos_y_button2 = 286;
|
||||
changed_prefs.pos_x_button3 = 430;
|
||||
changed_prefs.pos_y_button3 = 214;
|
||||
changed_prefs.pos_x_button4 = 378;
|
||||
changed_prefs.pos_y_button4 = 214;
|
||||
changed_prefs.pos_x_button5 = 430;
|
||||
changed_prefs.pos_y_button5 = 142;
|
||||
changed_prefs.pos_x_button6 = 378;
|
||||
changed_prefs.pos_y_button6 = 142;
|
||||
window_setup_position->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
@ -356,82 +356,82 @@ void ExitPanelOnScreen(void)
|
|||
|
||||
void RefreshPanelOnScreen(void)
|
||||
{
|
||||
if (workprefs.onScreen==0)
|
||||
if (changed_prefs.onScreen==0)
|
||||
checkBox_onscreen_control->setSelected(false);
|
||||
else if (workprefs.onScreen==1)
|
||||
else if (changed_prefs.onScreen==1)
|
||||
checkBox_onscreen_control->setSelected(true);
|
||||
if (workprefs.onScreen_textinput==0)
|
||||
if (changed_prefs.onScreen_textinput==0)
|
||||
checkBox_onscreen_textinput->setSelected(false);
|
||||
else if (workprefs.onScreen_textinput==1)
|
||||
else if (changed_prefs.onScreen_textinput==1)
|
||||
checkBox_onscreen_textinput->setSelected(true);
|
||||
if (workprefs.onScreen_dpad==0)
|
||||
if (changed_prefs.onScreen_dpad==0)
|
||||
checkBox_onscreen_dpad->setSelected(false);
|
||||
else if (workprefs.onScreen_dpad==1)
|
||||
else if (changed_prefs.onScreen_dpad==1)
|
||||
checkBox_onscreen_dpad->setSelected(true);
|
||||
if (workprefs.onScreen_button1==0)
|
||||
if (changed_prefs.onScreen_button1==0)
|
||||
checkBox_onscreen_button1->setSelected(false);
|
||||
else if (workprefs.onScreen_button1==1)
|
||||
else if (changed_prefs.onScreen_button1==1)
|
||||
checkBox_onscreen_button1->setSelected(true);
|
||||
if (workprefs.onScreen_button2==0)
|
||||
if (changed_prefs.onScreen_button2==0)
|
||||
checkBox_onscreen_button2->setSelected(false);
|
||||
else if (workprefs.onScreen_button2==1)
|
||||
else if (changed_prefs.onScreen_button2==1)
|
||||
checkBox_onscreen_button2->setSelected(true);
|
||||
if (workprefs.onScreen_button3==0)
|
||||
if (changed_prefs.onScreen_button3==0)
|
||||
checkBox_onscreen_button3->setSelected(false);
|
||||
else if (workprefs.onScreen_button3==1)
|
||||
else if (changed_prefs.onScreen_button3==1)
|
||||
checkBox_onscreen_button3->setSelected(true);
|
||||
if (workprefs.onScreen_button4==0)
|
||||
if (changed_prefs.onScreen_button4==0)
|
||||
checkBox_onscreen_button4->setSelected(false);
|
||||
else if (workprefs.onScreen_button4==1)
|
||||
else if (changed_prefs.onScreen_button4==1)
|
||||
checkBox_onscreen_button4->setSelected(true);
|
||||
if (workprefs.onScreen_button5==0)
|
||||
if (changed_prefs.onScreen_button5==0)
|
||||
checkBox_onscreen_button5->setSelected(false);
|
||||
else if (workprefs.onScreen_button5==1)
|
||||
else if (changed_prefs.onScreen_button5==1)
|
||||
checkBox_onscreen_button5->setSelected(true);
|
||||
if (workprefs.onScreen_button6==0)
|
||||
if (changed_prefs.onScreen_button6==0)
|
||||
checkBox_onscreen_button6->setSelected(false);
|
||||
else if (workprefs.onScreen_button6==1)
|
||||
else if (changed_prefs.onScreen_button6==1)
|
||||
checkBox_onscreen_button6->setSelected(true);
|
||||
if (workprefs.custom_position==0)
|
||||
if (changed_prefs.custom_position==0)
|
||||
checkBox_onscreen_custompos->setSelected(false);
|
||||
else if (workprefs.custom_position==1)
|
||||
else if (changed_prefs.custom_position==1)
|
||||
checkBox_onscreen_custompos->setSelected(true);
|
||||
if (workprefs.floatingJoystick)
|
||||
if (changed_prefs.floatingJoystick)
|
||||
checkBox_floatingJoystick->setSelected(true);
|
||||
else
|
||||
checkBox_floatingJoystick->setSelected(false);
|
||||
if (workprefs.disableMenuVKeyb)
|
||||
if (changed_prefs.disableMenuVKeyb)
|
||||
checkBox_disableMenuVKeyb->setSelected(true);
|
||||
else
|
||||
checkBox_disableMenuVKeyb->setSelected(false);
|
||||
|
||||
textInput->disableVirtualKeyboard(workprefs.disableMenuVKeyb);
|
||||
textInput->disableVirtualKeyboard(changed_prefs.disableMenuVKeyb);
|
||||
|
||||
window_pos_textinput->setX(workprefs.pos_x_textinput);
|
||||
window_pos_textinput->setY(workprefs.pos_y_textinput);
|
||||
window_pos_textinput->setVisible(workprefs.onScreen_textinput);
|
||||
window_pos_dpad->setX(workprefs.pos_x_dpad);
|
||||
window_pos_dpad->setY(workprefs.pos_y_dpad);
|
||||
window_pos_dpad->setVisible(workprefs.onScreen_dpad);
|
||||
window_pos_button1->setX(workprefs.pos_x_button1);
|
||||
window_pos_button1->setY(workprefs.pos_y_button1);
|
||||
window_pos_button1->setVisible(workprefs.onScreen_button1);
|
||||
window_pos_button2->setX(workprefs.pos_x_button2);
|
||||
window_pos_button2->setY(workprefs.pos_y_button2);
|
||||
window_pos_button2->setVisible(workprefs.onScreen_button2);
|
||||
window_pos_button3->setX(workprefs.pos_x_button3);
|
||||
window_pos_button3->setY(workprefs.pos_y_button3);
|
||||
window_pos_button3->setVisible(workprefs.onScreen_button3);
|
||||
window_pos_button4->setX(workprefs.pos_x_button4);
|
||||
window_pos_button4->setY(workprefs.pos_y_button4);
|
||||
window_pos_button4->setVisible(workprefs.onScreen_button4);
|
||||
window_pos_button5->setX(workprefs.pos_x_button5);
|
||||
window_pos_button5->setY(workprefs.pos_y_button5);
|
||||
window_pos_button5->setVisible(workprefs.onScreen_button5);
|
||||
window_pos_button6->setX(workprefs.pos_x_button6);
|
||||
window_pos_button6->setY(workprefs.pos_y_button6);
|
||||
window_pos_button6->setVisible(workprefs.onScreen_button6);
|
||||
button_onscreen_pos->setVisible(workprefs.custom_position);
|
||||
window_pos_textinput->setX(changed_prefs.pos_x_textinput);
|
||||
window_pos_textinput->setY(changed_prefs.pos_y_textinput);
|
||||
window_pos_textinput->setVisible(changed_prefs.onScreen_textinput);
|
||||
window_pos_dpad->setX(changed_prefs.pos_x_dpad);
|
||||
window_pos_dpad->setY(changed_prefs.pos_y_dpad);
|
||||
window_pos_dpad->setVisible(changed_prefs.onScreen_dpad);
|
||||
window_pos_button1->setX(changed_prefs.pos_x_button1);
|
||||
window_pos_button1->setY(changed_prefs.pos_y_button1);
|
||||
window_pos_button1->setVisible(changed_prefs.onScreen_button1);
|
||||
window_pos_button2->setX(changed_prefs.pos_x_button2);
|
||||
window_pos_button2->setY(changed_prefs.pos_y_button2);
|
||||
window_pos_button2->setVisible(changed_prefs.onScreen_button2);
|
||||
window_pos_button3->setX(changed_prefs.pos_x_button3);
|
||||
window_pos_button3->setY(changed_prefs.pos_y_button3);
|
||||
window_pos_button3->setVisible(changed_prefs.onScreen_button3);
|
||||
window_pos_button4->setX(changed_prefs.pos_x_button4);
|
||||
window_pos_button4->setY(changed_prefs.pos_y_button4);
|
||||
window_pos_button4->setVisible(changed_prefs.onScreen_button4);
|
||||
window_pos_button5->setX(changed_prefs.pos_x_button5);
|
||||
window_pos_button5->setY(changed_prefs.pos_y_button5);
|
||||
window_pos_button5->setVisible(changed_prefs.onScreen_button5);
|
||||
window_pos_button6->setX(changed_prefs.pos_x_button6);
|
||||
window_pos_button6->setY(changed_prefs.pos_y_button6);
|
||||
window_pos_button6->setVisible(changed_prefs.onScreen_button6);
|
||||
button_onscreen_pos->setVisible(changed_prefs.custom_position);
|
||||
}
|
||||
|
||||
bool HelpPanelOnScreen(std::vector<std::string> &helptext)
|
||||
|
|
|
@ -199,7 +199,7 @@ static void SetControlState(const int model)
|
|||
break;
|
||||
}
|
||||
|
||||
chkDFxWriteProtect[0]->setEnabled(df0Editable && !workprefs.floppy_read_only);
|
||||
chkDFxWriteProtect[0]->setEnabled(df0Editable && !changed_prefs.floppy_read_only);
|
||||
cmdDFxInfo[0]->setEnabled(df0Editable);
|
||||
cmdDFxEject[0]->setEnabled(df0Editable);
|
||||
cmdDFxSelect[0]->setEnabled(df0Editable);
|
||||
|
@ -221,9 +221,9 @@ static void SetControlState(const int model)
|
|||
|
||||
static void AdjustPrefs(void)
|
||||
{
|
||||
//const auto old_cs = workprefs.cs_compatible;
|
||||
//const auto old_cs = changed_prefs.cs_compatible;
|
||||
|
||||
built_in_prefs(&workprefs, quickstart_model, quickstart_conf, 0, 0);
|
||||
built_in_prefs(&changed_prefs, quickstart_model, quickstart_conf, 0, 0);
|
||||
switch (quickstart_model)
|
||||
{
|
||||
case 0: // A500
|
||||
|
@ -235,22 +235,22 @@ static void AdjustPrefs(void)
|
|||
case 6: // A4000
|
||||
case 7: // A4000T
|
||||
// df0 always active
|
||||
workprefs.floppyslots[0].dfxtype = DRV_35_DD;
|
||||
changed_prefs.floppyslots[0].dfxtype = DRV_35_DD;
|
||||
|
||||
// No CD available
|
||||
workprefs.cdslots[0].inuse = false;
|
||||
workprefs.cdslots[0].type = SCSI_UNIT_DISABLED;
|
||||
changed_prefs.cdslots[0].inuse = false;
|
||||
changed_prefs.cdslots[0].type = SCSI_UNIT_DISABLED;
|
||||
break;
|
||||
|
||||
case 8: // CD32
|
||||
case 9: // CDTV
|
||||
// No floppy drive available, CD available
|
||||
workprefs.floppyslots[0].dfxtype = DRV_NONE;
|
||||
workprefs.floppyslots[1].dfxtype = DRV_NONE;
|
||||
workprefs.cdslots[0].inuse = true;
|
||||
workprefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
workprefs.gfx_monitor.gfx_size.width = 768;
|
||||
workprefs.gfx_monitor.gfx_size.height = 270;
|
||||
changed_prefs.floppyslots[0].dfxtype = DRV_NONE;
|
||||
changed_prefs.floppyslots[1].dfxtype = DRV_NONE;
|
||||
changed_prefs.cdslots[0].inuse = true;
|
||||
changed_prefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
changed_prefs.gfx_monitor.gfx_size.width = 768;
|
||||
changed_prefs.gfx_monitor.gfx_size.height = 270;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -356,25 +356,25 @@ public:
|
|||
//---------------------------------------
|
||||
// Eject CD from drive
|
||||
//---------------------------------------
|
||||
strncpy(workprefs.cdslots[0].name, "", MAX_DPATH);
|
||||
strncpy(changed_prefs.cdslots[0].name, "", MAX_DPATH);
|
||||
AdjustDropDownControls();
|
||||
}
|
||||
else if (actionEvent.getSource() == cmdCDSelect)
|
||||
{
|
||||
char tmp[MAX_DPATH];
|
||||
|
||||
if (strlen(workprefs.cdslots[0].name) > 0)
|
||||
strncpy(tmp, workprefs.cdslots[0].name, MAX_DPATH);
|
||||
if (strlen(changed_prefs.cdslots[0].name) > 0)
|
||||
strncpy(tmp, changed_prefs.cdslots[0].name, MAX_DPATH);
|
||||
else
|
||||
strncpy(tmp, currentDir, MAX_DPATH);
|
||||
|
||||
if (SelectFile("Select CD image file", tmp, cdfile_filter))
|
||||
{
|
||||
if (strncmp(workprefs.cdslots[0].name, tmp, MAX_DPATH) != 0)
|
||||
if (strncmp(changed_prefs.cdslots[0].name, tmp, MAX_DPATH) != 0)
|
||||
{
|
||||
strncpy(workprefs.cdslots[0].name, tmp, MAX_DPATH);
|
||||
workprefs.cdslots[0].inuse = true;
|
||||
workprefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
strncpy(changed_prefs.cdslots[0].name, tmp, MAX_DPATH);
|
||||
changed_prefs.cdslots[0].inuse = true;
|
||||
changed_prefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
AddFileToCDList(tmp, 1);
|
||||
extractPath(tmp, currentDir);
|
||||
|
||||
|
@ -408,18 +408,18 @@ public:
|
|||
|
||||
if (idx < 0)
|
||||
{
|
||||
strncpy(workprefs.cdslots[0].name, "", MAX_DPATH);
|
||||
strncpy(changed_prefs.cdslots[0].name, "", MAX_DPATH);
|
||||
AdjustDropDownControls();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cdfileList.getElementAt(idx) != workprefs.cdslots[0].name)
|
||||
if (cdfileList.getElementAt(idx) != changed_prefs.cdslots[0].name)
|
||||
{
|
||||
strncpy(workprefs.cdslots[0].name, cdfileList.getElementAt(idx).c_str(), MAX_DPATH);
|
||||
workprefs.cdslots[0].inuse = true;
|
||||
workprefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
strncpy(changed_prefs.cdslots[0].name, cdfileList.getElementAt(idx).c_str(), MAX_DPATH);
|
||||
changed_prefs.cdslots[0].inuse = true;
|
||||
changed_prefs.cdslots[0].type = SCSI_UNIT_IMAGE;
|
||||
lstMRUCDList.erase(lstMRUCDList.begin() + idx);
|
||||
lstMRUCDList.insert(lstMRUCDList.begin(), workprefs.cdslots[0].name);
|
||||
lstMRUCDList.insert(lstMRUCDList.begin(), changed_prefs.cdslots[0].name);
|
||||
bIgnoreListChange = true;
|
||||
cboCDFile->setSelected(0);
|
||||
bIgnoreListChange = false;
|
||||
|
@ -489,13 +489,13 @@ public:
|
|||
{
|
||||
if (chkNTSC->isSelected())
|
||||
{
|
||||
workprefs.ntscmode = true;
|
||||
workprefs.chipset_refreshrate = 60;
|
||||
changed_prefs.ntscmode = true;
|
||||
changed_prefs.chipset_refreshrate = 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
workprefs.ntscmode = false;
|
||||
workprefs.chipset_refreshrate = 50;
|
||||
changed_prefs.ntscmode = false;
|
||||
changed_prefs.chipset_refreshrate = 50;
|
||||
}
|
||||
RefreshPanelChipset();
|
||||
}
|
||||
|
@ -517,18 +517,18 @@ public:
|
|||
// Drive enabled/disabled
|
||||
//---------------------------------------
|
||||
if (chkDFx[i]->isSelected())
|
||||
workprefs.floppyslots[i].dfxtype = DRV_35_DD;
|
||||
changed_prefs.floppyslots[i].dfxtype = DRV_35_DD;
|
||||
else
|
||||
workprefs.floppyslots[i].dfxtype = DRV_NONE;
|
||||
changed_prefs.floppyslots[i].dfxtype = DRV_NONE;
|
||||
}
|
||||
else if (actionEvent.getSource() == chkDFxWriteProtect[i])
|
||||
{
|
||||
//---------------------------------------
|
||||
// Write-protect changed
|
||||
//---------------------------------------
|
||||
disk_setwriteprotect(&workprefs, i, workprefs.floppyslots[i].df,
|
||||
disk_setwriteprotect(&changed_prefs, i, changed_prefs.floppyslots[i].df,
|
||||
chkDFxWriteProtect[i]->isSelected());
|
||||
if (disk_getwriteprotect(&workprefs, workprefs.floppyslots[i].df) != chkDFxWriteProtect[i]->
|
||||
if (disk_getwriteprotect(&changed_prefs, changed_prefs.floppyslots[i].df) != chkDFxWriteProtect[i]->
|
||||
isSelected())
|
||||
{
|
||||
// Failed to change write protection -> maybe filesystem doesn't support this
|
||||
|
@ -560,7 +560,7 @@ public:
|
|||
//---------------------------------------
|
||||
// Show info about current disk-image
|
||||
//---------------------------------------
|
||||
//if (workprefs.floppyslots[i].dfxtype != DRV_NONE && strlen(workprefs.floppyslots[i].df) > 0);
|
||||
//if (changed_prefs.floppyslots[i].dfxtype != DRV_NONE && strlen(changed_prefs.floppyslots[i].df) > 0);
|
||||
// ToDo: Show info dialog
|
||||
}
|
||||
else if (actionEvent.getSource() == cmdDFxEject[i])
|
||||
|
@ -569,7 +569,7 @@ public:
|
|||
// Eject disk from drive
|
||||
//---------------------------------------
|
||||
disk_eject(i);
|
||||
strncpy(workprefs.floppyslots[i].df, "", MAX_DPATH);
|
||||
strncpy(changed_prefs.floppyslots[i].df, "", MAX_DPATH);
|
||||
AdjustDropDownControls();
|
||||
}
|
||||
else if (actionEvent.getSource() == cmdDFxSelect[i])
|
||||
|
@ -579,15 +579,15 @@ public:
|
|||
//---------------------------------------
|
||||
char tmp[MAX_DPATH];
|
||||
|
||||
if (strlen(workprefs.floppyslots[i].df) > 0)
|
||||
strncpy(tmp, workprefs.floppyslots[i].df, MAX_DPATH);
|
||||
if (strlen(changed_prefs.floppyslots[i].df) > 0)
|
||||
strncpy(tmp, changed_prefs.floppyslots[i].df, MAX_DPATH);
|
||||
else
|
||||
strncpy(tmp, currentDir, MAX_DPATH);
|
||||
if (SelectFile("Select disk image file", tmp, diskfile_filter))
|
||||
{
|
||||
if (strncmp(workprefs.floppyslots[i].df, tmp, MAX_DPATH) != 0)
|
||||
if (strncmp(changed_prefs.floppyslots[i].df, tmp, MAX_DPATH) != 0)
|
||||
{
|
||||
strncpy(workprefs.floppyslots[i].df, tmp, MAX_DPATH);
|
||||
strncpy(changed_prefs.floppyslots[i].df, tmp, MAX_DPATH);
|
||||
disk_insert(i, tmp);
|
||||
AddFileToDiskList(tmp, 1);
|
||||
extractPath(tmp, currentDir);
|
||||
|
@ -626,17 +626,17 @@ public:
|
|||
if (idx < 0)
|
||||
{
|
||||
disk_eject(i);
|
||||
strncpy(workprefs.floppyslots[i].df, "", MAX_DPATH);
|
||||
strncpy(changed_prefs.floppyslots[i].df, "", MAX_DPATH);
|
||||
AdjustDropDownControls();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (diskfileList.getElementAt(idx) != workprefs.floppyslots[i].df)
|
||||
if (diskfileList.getElementAt(idx) != changed_prefs.floppyslots[i].df)
|
||||
{
|
||||
strncpy(workprefs.floppyslots[i].df, diskfileList.getElementAt(idx).c_str(), MAX_DPATH);
|
||||
disk_insert(i, workprefs.floppyslots[i].df);
|
||||
strncpy(changed_prefs.floppyslots[i].df, diskfileList.getElementAt(idx).c_str(), MAX_DPATH);
|
||||
disk_insert(i, changed_prefs.floppyslots[i].df);
|
||||
lstMRUDiskList.erase(lstMRUDiskList.begin() + idx);
|
||||
lstMRUDiskList.insert(lstMRUDiskList.begin(), workprefs.floppyslots[i].df);
|
||||
lstMRUDiskList.insert(lstMRUDiskList.begin(), changed_prefs.floppyslots[i].df);
|
||||
bIgnoreListChange = true;
|
||||
cboDFxFile[i]->setSelected(0);
|
||||
bIgnoreListChange = false;
|
||||
|
@ -877,11 +877,11 @@ static void AdjustDropDownControls(void)
|
|||
{
|
||||
cboDFxFile[i]->clearSelected();
|
||||
|
||||
if (workprefs.floppyslots[i].dfxtype != DRV_NONE && strlen(workprefs.floppyslots[i].df) > 0)
|
||||
if (changed_prefs.floppyslots[i].dfxtype != DRV_NONE && strlen(changed_prefs.floppyslots[i].df) > 0)
|
||||
{
|
||||
for (unsigned int j = 0; j < lstMRUDiskList.size(); ++j)
|
||||
{
|
||||
if (strcmp(lstMRUDiskList[j].c_str(), workprefs.floppyslots[i].df) == 0)
|
||||
if (strcmp(lstMRUDiskList[j].c_str(), changed_prefs.floppyslots[i].df) == 0)
|
||||
{
|
||||
cboDFxFile[i]->setSelected(j);
|
||||
break;
|
||||
|
@ -891,11 +891,11 @@ static void AdjustDropDownControls(void)
|
|||
}
|
||||
|
||||
cboCDFile->clearSelected();
|
||||
if (workprefs.cdslots[0].inuse && strlen(workprefs.cdslots[0].name) > 0)
|
||||
if (changed_prefs.cdslots[0].inuse && strlen(changed_prefs.cdslots[0].name) > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < lstMRUCDList.size(); ++i)
|
||||
{
|
||||
if (lstMRUCDList[i].c_str() != workprefs.cdslots[0].name)
|
||||
if (lstMRUCDList[i].c_str() != changed_prefs.cdslots[0].name)
|
||||
{
|
||||
cboCDFile->setSelected(i);
|
||||
break;
|
||||
|
@ -911,38 +911,38 @@ void RefreshPanelQuickstart(void)
|
|||
{
|
||||
auto prevAvailable = true;
|
||||
|
||||
chkNTSC->setSelected(workprefs.ntscmode);
|
||||
chkNTSC->setSelected(changed_prefs.ntscmode);
|
||||
|
||||
AdjustDropDownControls();
|
||||
|
||||
workprefs.nr_floppies = 0;
|
||||
changed_prefs.nr_floppies = 0;
|
||||
for (auto i = 0; i < 4; ++i)
|
||||
{
|
||||
const auto driveEnabled = workprefs.floppyslots[i].dfxtype != DRV_NONE;
|
||||
const auto driveEnabled = changed_prefs.floppyslots[i].dfxtype != DRV_NONE;
|
||||
if (i < 2)
|
||||
{
|
||||
chkDFx[i]->setSelected(driveEnabled);
|
||||
chkDFxWriteProtect[i]->setSelected(disk_getwriteprotect(&workprefs, workprefs.floppyslots[i].df));
|
||||
chkDFxWriteProtect[i]->setSelected(disk_getwriteprotect(&changed_prefs, changed_prefs.floppyslots[i].df));
|
||||
if (i == 0)
|
||||
chkDFx[i]->setEnabled(false);
|
||||
else
|
||||
chkDFx[i]->setEnabled(prevAvailable);
|
||||
|
||||
cmdDFxInfo[i]->setEnabled(driveEnabled);
|
||||
chkDFxWriteProtect[i]->setEnabled(driveEnabled && !workprefs.floppy_read_only);
|
||||
chkDFxWriteProtect[i]->setEnabled(driveEnabled && !changed_prefs.floppy_read_only);
|
||||
cmdDFxEject[i]->setEnabled(driveEnabled);
|
||||
cmdDFxSelect[i]->setEnabled(driveEnabled);
|
||||
cboDFxFile[i]->setEnabled(driveEnabled);
|
||||
}
|
||||
prevAvailable = driveEnabled;
|
||||
if (driveEnabled)
|
||||
workprefs.nr_floppies = i + 1;
|
||||
changed_prefs.nr_floppies = i + 1;
|
||||
}
|
||||
|
||||
chkCD->setSelected(workprefs.cdslots[0].inuse);
|
||||
cmdCDEject->setEnabled(workprefs.cdslots[0].inuse);
|
||||
cmdCDSelect->setEnabled(workprefs.cdslots[0].inuse);
|
||||
cboCDFile->setEnabled(workprefs.cdslots[0].inuse);
|
||||
chkCD->setSelected(changed_prefs.cdslots[0].inuse);
|
||||
cmdCDEject->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||
cmdCDSelect->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||
cboCDFile->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||
|
||||
chkQuickstartMode->setSelected(quickstart_start);
|
||||
}
|
||||
|
|
|
@ -61,47 +61,47 @@ public:
|
|||
{
|
||||
if (actionEvent.getSource() == sldChipmem)
|
||||
{
|
||||
workprefs.chipmem_size = ChipMem_values[int(sldChipmem->getValue())];
|
||||
if ((workprefs.chipmem_size > 0x200000) && (workprefs.fastmem[0].size > 0))
|
||||
workprefs.fastmem[0].size = 0;
|
||||
changed_prefs.chipmem_size = ChipMem_values[int(sldChipmem->getValue())];
|
||||
if ((changed_prefs.chipmem_size > 0x200000) && (changed_prefs.fastmem[0].size > 0))
|
||||
changed_prefs.fastmem[0].size = 0;
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldSlowmem)
|
||||
{
|
||||
workprefs.bogomem_size = SlowMem_values[int(sldSlowmem->getValue())];
|
||||
changed_prefs.bogomem_size = SlowMem_values[int(sldSlowmem->getValue())];
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldFastmem)
|
||||
{
|
||||
workprefs.fastmem[0].size = FastMem_values[int(sldFastmem->getValue())];
|
||||
if (workprefs.fastmem[0].size > 0 && workprefs.chipmem_size > 0x200000)
|
||||
workprefs.chipmem_size = 0x200000;
|
||||
changed_prefs.fastmem[0].size = FastMem_values[int(sldFastmem->getValue())];
|
||||
if (changed_prefs.fastmem[0].size > 0 && changed_prefs.chipmem_size > 0x200000)
|
||||
changed_prefs.chipmem_size = 0x200000;
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldZ3mem)
|
||||
{
|
||||
workprefs.z3fastmem[0].size = FastMem_values[int(sldZ3mem->getValue())];
|
||||
if (workprefs.z3fastmem[0].size > max_z3fastmem)
|
||||
workprefs.z3fastmem[0].size = max_z3fastmem;
|
||||
changed_prefs.z3fastmem[0].size = FastMem_values[int(sldZ3mem->getValue())];
|
||||
if (changed_prefs.z3fastmem[0].size > max_z3fastmem)
|
||||
changed_prefs.z3fastmem[0].size = max_z3fastmem;
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldGfxmem)
|
||||
{
|
||||
workprefs.rtgboards[0].rtgmem_size = FastMem_values[int(sldGfxmem->getValue())];
|
||||
workprefs.rtgboards[0].rtgmem_type = GFXBOARD_UAE_Z3;
|
||||
changed_prefs.rtgboards[0].rtgmem_size = FastMem_values[int(sldGfxmem->getValue())];
|
||||
changed_prefs.rtgboards[0].rtgmem_type = GFXBOARD_UAE_Z3;
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldA3000Lowmem)
|
||||
{
|
||||
workprefs.mbresmem_low_size = A3000LowMem_values[int(sldA3000Lowmem->getValue())];
|
||||
if (currprefs.mbresmem_low_size != workprefs.mbresmem_low_size)
|
||||
changed_prefs.mbresmem_low_size = A3000LowMem_values[int(sldA3000Lowmem->getValue())];
|
||||
if (currprefs.mbresmem_low_size != changed_prefs.mbresmem_low_size)
|
||||
DisableResume();
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldA3000Highmem)
|
||||
{
|
||||
workprefs.mbresmem_high_size = A3000HighMem_values[int(sldA3000Highmem->getValue())];
|
||||
if (currprefs.mbresmem_high_size != workprefs.mbresmem_high_size)
|
||||
changed_prefs.mbresmem_high_size = A3000HighMem_values[int(sldA3000Highmem->getValue())];
|
||||
if (currprefs.mbresmem_high_size != changed_prefs.mbresmem_high_size)
|
||||
DisableResume();
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ void RefreshPanelRAM()
|
|||
|
||||
for (i = 0; i < 5; ++i)
|
||||
{
|
||||
if (workprefs.chipmem_size == ChipMem_values[i])
|
||||
if (changed_prefs.chipmem_size == ChipMem_values[i])
|
||||
{
|
||||
sldChipmem->setValue(i);
|
||||
lblChipsize->setCaption(ChipMem_list[i]);
|
||||
|
@ -288,7 +288,7 @@ void RefreshPanelRAM()
|
|||
|
||||
for (i = 0; i < 5; ++i)
|
||||
{
|
||||
if (workprefs.bogomem_size == SlowMem_values[i])
|
||||
if (changed_prefs.bogomem_size == SlowMem_values[i])
|
||||
{
|
||||
sldSlowmem->setValue(i);
|
||||
lblSlowsize->setCaption(SlowMem_list[i]);
|
||||
|
@ -298,7 +298,7 @@ void RefreshPanelRAM()
|
|||
|
||||
for (i = 0; i < 5; ++i)
|
||||
{
|
||||
if (workprefs.fastmem[0].size == FastMem_values[i])
|
||||
if (changed_prefs.fastmem[0].size == FastMem_values[i])
|
||||
{
|
||||
sldFastmem->setValue(i);
|
||||
lblFastsize->setCaption(FastMem_list[i]);
|
||||
|
@ -308,29 +308,29 @@ void RefreshPanelRAM()
|
|||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
if (workprefs.z3fastmem[0].size == FastMem_values[i])
|
||||
if (changed_prefs.z3fastmem[0].size == FastMem_values[i])
|
||||
{
|
||||
sldZ3mem->setValue(i);
|
||||
lblZ3size->setCaption(FastMem_list[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
sldZ3mem->setEnabled(!workprefs.address_space_24);
|
||||
sldZ3mem->setEnabled(!changed_prefs.address_space_24);
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
if (workprefs.rtgboards[0].rtgmem_size == FastMem_values[i])
|
||||
if (changed_prefs.rtgboards[0].rtgmem_size == FastMem_values[i])
|
||||
{
|
||||
sldGfxmem->setValue(i);
|
||||
lblGfxsize->setCaption(FastMem_list[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
sldGfxmem->setEnabled(!workprefs.address_space_24);
|
||||
sldGfxmem->setEnabled(!changed_prefs.address_space_24);
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
if (workprefs.mbresmem_low_size == A3000LowMem_values[i])
|
||||
if (changed_prefs.mbresmem_low_size == A3000LowMem_values[i])
|
||||
{
|
||||
sldA3000Lowmem->setValue(i);
|
||||
lblA3000Lowsize->setCaption(A3000LowMem_list[i]);
|
||||
|
@ -340,7 +340,7 @@ void RefreshPanelRAM()
|
|||
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
if (workprefs.mbresmem_high_size == A3000HighMem_values[i])
|
||||
if (changed_prefs.mbresmem_high_size == A3000HighMem_values[i])
|
||||
{
|
||||
sldA3000Highmem->setValue(i);
|
||||
lblA3000Highsize->setCaption(A3000HighMem_list[i]);
|
||||
|
|
|
@ -99,7 +99,7 @@ public:
|
|||
{
|
||||
const auto rom = mainROMList->getROMat(cboMainROM->getSelected());
|
||||
if (rom != nullptr)
|
||||
strncpy(workprefs.romfile, rom->Path, sizeof(workprefs.romfile));
|
||||
strncpy(changed_prefs.romfile, rom->Path, sizeof(changed_prefs.romfile));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -113,9 +113,9 @@ public:
|
|||
{
|
||||
const auto rom = extROMList->getROMat(cboExtROM->getSelected());
|
||||
if (rom != nullptr)
|
||||
strncpy(workprefs.romextfile, rom->Path, sizeof(workprefs.romextfile));
|
||||
strncpy(changed_prefs.romextfile, rom->Path, sizeof(changed_prefs.romextfile));
|
||||
else
|
||||
strncpy(workprefs.romextfile, " ", sizeof(workprefs.romextfile));
|
||||
strncpy(changed_prefs.romextfile, " ", sizeof(changed_prefs.romextfile));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -128,9 +128,9 @@ public:
|
|||
{
|
||||
const auto rom = cartROMList->getROMat(cboCartROM->getSelected());
|
||||
if (rom != nullptr)
|
||||
strncpy(workprefs.cartfile, rom->Path, sizeof workprefs.cartfile);
|
||||
strncpy(changed_prefs.cartfile, rom->Path, sizeof changed_prefs.cartfile);
|
||||
else
|
||||
strncpy(workprefs.cartfile, "", sizeof workprefs.cartfile);
|
||||
strncpy(changed_prefs.cartfile, "", sizeof changed_prefs.cartfile);
|
||||
}
|
||||
};
|
||||
static CartROMActionListener* cartROMActionListener;
|
||||
|
@ -154,7 +154,7 @@ public:
|
|||
strncpy(newrom->Path, tmp, MAX_DPATH);
|
||||
newrom->ROMType = ROMTYPE_KICK;
|
||||
lstAvailableROMs.push_back(newrom);
|
||||
strncpy(workprefs.romfile, tmp, sizeof(workprefs.romfile));
|
||||
strncpy(changed_prefs.romfile, tmp, sizeof(changed_prefs.romfile));
|
||||
RefreshPanelROM();
|
||||
}
|
||||
cmdMainROM->requestFocus();
|
||||
|
@ -170,7 +170,7 @@ public:
|
|||
strncpy(newrom->Path, tmp, MAX_DPATH);
|
||||
newrom->ROMType = ROMTYPE_EXTCDTV;
|
||||
lstAvailableROMs.push_back(newrom);
|
||||
strncpy(workprefs.romextfile, tmp, sizeof(workprefs.romextfile));
|
||||
strncpy(changed_prefs.romextfile, tmp, sizeof(changed_prefs.romextfile));
|
||||
RefreshPanelROM();
|
||||
}
|
||||
cmdExtROM->requestFocus();
|
||||
|
@ -186,7 +186,7 @@ public:
|
|||
strncpy(newrom->Path, tmp, MAX_DPATH);
|
||||
newrom->ROMType = ROMTYPE_CD32CART;
|
||||
lstAvailableROMs.push_back(newrom);
|
||||
strncpy(workprefs.romextfile, tmp, sizeof(workprefs.romextfile));
|
||||
strncpy(changed_prefs.romextfile, tmp, sizeof(changed_prefs.romextfile));
|
||||
RefreshPanelROM();
|
||||
}
|
||||
cmdCartROM->requestFocus();
|
||||
|
@ -297,13 +297,13 @@ void ExitPanelROM()
|
|||
|
||||
void RefreshPanelROM()
|
||||
{
|
||||
auto idx = mainROMList->InitROMList(workprefs.romfile);
|
||||
auto idx = mainROMList->InitROMList(changed_prefs.romfile);
|
||||
cboMainROM->setSelected(idx);
|
||||
|
||||
idx = extROMList->InitROMList(workprefs.romextfile);
|
||||
idx = extROMList->InitROMList(changed_prefs.romextfile);
|
||||
cboExtROM->setSelected(idx);
|
||||
|
||||
idx = cartROMList->InitROMList(workprefs.cartfile);
|
||||
idx = cartROMList->InitROMList(changed_prefs.cartfile);
|
||||
cboCartROM->setSelected(idx);
|
||||
}
|
||||
|
||||
|
|
|
@ -141,34 +141,34 @@ public:
|
|||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optSoundDisabled)
|
||||
workprefs.produce_sound = 0;
|
||||
changed_prefs.produce_sound = 0;
|
||||
else if (actionEvent.getSource() == optSoundDisabledEmu)
|
||||
workprefs.produce_sound = 1;
|
||||
changed_prefs.produce_sound = 1;
|
||||
else if (actionEvent.getSource() == optSoundEmulated)
|
||||
workprefs.produce_sound = 2;
|
||||
changed_prefs.produce_sound = 2;
|
||||
else if (actionEvent.getSource() == optSoundEmulatedBest)
|
||||
workprefs.produce_sound = 3;
|
||||
changed_prefs.produce_sound = 3;
|
||||
|
||||
else if (actionEvent.getSource() == optMono)
|
||||
workprefs.sound_stereo = 0;
|
||||
changed_prefs.sound_stereo = 0;
|
||||
else if (actionEvent.getSource() == optStereo)
|
||||
workprefs.sound_stereo = 1;
|
||||
changed_prefs.sound_stereo = 1;
|
||||
|
||||
else if (actionEvent.getSource() == cboFrequency)
|
||||
{
|
||||
switch (cboFrequency->getSelected())
|
||||
{
|
||||
case 0:
|
||||
workprefs.sound_freq = 11025;
|
||||
changed_prefs.sound_freq = 11025;
|
||||
break;
|
||||
case 1:
|
||||
workprefs.sound_freq = 22050;
|
||||
changed_prefs.sound_freq = 22050;
|
||||
break;
|
||||
case 2:
|
||||
workprefs.sound_freq = 32000;
|
||||
changed_prefs.sound_freq = 32000;
|
||||
break;
|
||||
case 3:
|
||||
workprefs.sound_freq = 44100;
|
||||
changed_prefs.sound_freq = 44100;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -176,30 +176,30 @@ public:
|
|||
}
|
||||
|
||||
else if (actionEvent.getSource() == cboInterpolation)
|
||||
workprefs.sound_interpol = cboInterpolation->getSelected();
|
||||
changed_prefs.sound_interpol = cboInterpolation->getSelected();
|
||||
|
||||
else if (actionEvent.getSource() == cboFilter)
|
||||
{
|
||||
switch (cboFilter->getSelected())
|
||||
{
|
||||
case 0:
|
||||
workprefs.sound_filter = FILTER_SOUND_OFF;
|
||||
changed_prefs.sound_filter = FILTER_SOUND_OFF;
|
||||
break;
|
||||
case 1:
|
||||
workprefs.sound_filter = FILTER_SOUND_EMUL;
|
||||
workprefs.sound_filter_type = 0;
|
||||
changed_prefs.sound_filter = FILTER_SOUND_EMUL;
|
||||
changed_prefs.sound_filter_type = 0;
|
||||
break;
|
||||
case 2:
|
||||
workprefs.sound_filter = FILTER_SOUND_EMUL;
|
||||
workprefs.sound_filter_type = 1;
|
||||
changed_prefs.sound_filter = FILTER_SOUND_EMUL;
|
||||
changed_prefs.sound_filter_type = 1;
|
||||
break;
|
||||
case 3:
|
||||
workprefs.sound_filter = FILTER_SOUND_ON;
|
||||
workprefs.sound_filter_type = 0;
|
||||
changed_prefs.sound_filter = FILTER_SOUND_ON;
|
||||
changed_prefs.sound_filter_type = 0;
|
||||
break;
|
||||
case 4:
|
||||
workprefs.sound_filter = FILTER_SOUND_ON;
|
||||
workprefs.sound_filter_type = 1;
|
||||
changed_prefs.sound_filter = FILTER_SOUND_ON;
|
||||
changed_prefs.sound_filter_type = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -209,23 +209,23 @@ public:
|
|||
else if (actionEvent.getSource() == sldSeparation)
|
||||
{
|
||||
if (curr_separation_idx != int(sldSeparation->getValue())
|
||||
&& workprefs.sound_stereo > 0)
|
||||
&& changed_prefs.sound_stereo > 0)
|
||||
{
|
||||
curr_separation_idx = int(sldSeparation->getValue());
|
||||
workprefs.sound_stereo_separation = 10 - curr_separation_idx;
|
||||
changed_prefs.sound_stereo_separation = 10 - curr_separation_idx;
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == sldStereoDelay)
|
||||
{
|
||||
if (curr_stereodelay_idx != int(sldStereoDelay->getValue())
|
||||
&& workprefs.sound_stereo > 0)
|
||||
&& changed_prefs.sound_stereo > 0)
|
||||
{
|
||||
curr_stereodelay_idx = int(sldStereoDelay->getValue());
|
||||
if (curr_stereodelay_idx > 0)
|
||||
workprefs.sound_mixed_stereo_delay = curr_stereodelay_idx;
|
||||
changed_prefs.sound_mixed_stereo_delay = curr_stereodelay_idx;
|
||||
else
|
||||
workprefs.sound_mixed_stereo_delay = -1;
|
||||
changed_prefs.sound_mixed_stereo_delay = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ void RefreshPanelSound()
|
|||
{
|
||||
char tmp[10];
|
||||
|
||||
switch (workprefs.produce_sound)
|
||||
switch (changed_prefs.produce_sound)
|
||||
{
|
||||
case 0:
|
||||
optSoundDisabled->setSelected(true);
|
||||
|
@ -401,12 +401,12 @@ void RefreshPanelSound()
|
|||
break;
|
||||
}
|
||||
|
||||
if (workprefs.sound_stereo == 0)
|
||||
if (changed_prefs.sound_stereo == 0)
|
||||
optMono->setSelected(true);
|
||||
else if (workprefs.sound_stereo == 1)
|
||||
else if (changed_prefs.sound_stereo == 1)
|
||||
optStereo->setSelected(true);
|
||||
|
||||
switch (workprefs.sound_freq)
|
||||
switch (changed_prefs.sound_freq)
|
||||
{
|
||||
case 11025:
|
||||
cboFrequency->setSelected(0);
|
||||
|
@ -422,43 +422,43 @@ void RefreshPanelSound()
|
|||
break;
|
||||
}
|
||||
|
||||
cboInterpolation->setSelected(workprefs.sound_interpol);
|
||||
cboInterpolation->setSelected(changed_prefs.sound_interpol);
|
||||
|
||||
auto i = 0;
|
||||
switch (workprefs.sound_filter)
|
||||
switch (changed_prefs.sound_filter)
|
||||
{
|
||||
case 0:
|
||||
i = 0;
|
||||
break;
|
||||
case 1:
|
||||
i = workprefs.sound_filter_type ? 2 : 1;
|
||||
i = changed_prefs.sound_filter_type ? 2 : 1;
|
||||
break;
|
||||
case 2:
|
||||
i = workprefs.sound_filter_type ? 4 : 3;
|
||||
i = changed_prefs.sound_filter_type ? 4 : 3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
cboFilter->setSelected(i);
|
||||
|
||||
if (workprefs.sound_stereo == 0)
|
||||
if (changed_prefs.sound_stereo == 0)
|
||||
{
|
||||
curr_separation_idx = 0;
|
||||
curr_stereodelay_idx = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
curr_separation_idx = 10 - workprefs.sound_stereo_separation;
|
||||
curr_stereodelay_idx = workprefs.sound_mixed_stereo_delay > 0 ? workprefs.sound_mixed_stereo_delay : 0;
|
||||
curr_separation_idx = 10 - changed_prefs.sound_stereo_separation;
|
||||
curr_stereodelay_idx = changed_prefs.sound_mixed_stereo_delay > 0 ? changed_prefs.sound_mixed_stereo_delay : 0;
|
||||
}
|
||||
|
||||
sldSeparation->setValue(curr_separation_idx);
|
||||
sldSeparation->setEnabled(workprefs.sound_stereo >= 1);
|
||||
sldSeparation->setEnabled(changed_prefs.sound_stereo >= 1);
|
||||
snprintf(tmp, 10, "%d%%", 100 - 10 * curr_separation_idx);
|
||||
lblSeparationInfo->setCaption(tmp);
|
||||
|
||||
sldStereoDelay->setValue(curr_stereodelay_idx);
|
||||
sldStereoDelay->setEnabled(workprefs.sound_stereo >= 1);
|
||||
sldStereoDelay->setEnabled(changed_prefs.sound_stereo >= 1);
|
||||
if (curr_stereodelay_idx <= 0)
|
||||
lblStereoDelayInfo->setCaption("-");
|
||||
else
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef GUI_HANDLING_H
|
||||
#define GUI_HANDLING_H
|
||||
|
||||
extern struct uae_prefs workprefs;
|
||||
|
||||
#define GUI_WIDTH 800
|
||||
#define GUI_HEIGHT 480
|
||||
#define DISTANCE_BORDER 15
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue