Added CD Turbo checkbox
Also moved CD Volume slider to Sound panel
This commit is contained in:
parent
b804884137
commit
c1d2c3d2f9
3 changed files with 71 additions and 60 deletions
|
@ -183,8 +183,8 @@ static NavigationMap navMap[] =
|
||||||
|
|
||||||
// active move left move right move up move down
|
// active move left move right move up move down
|
||||||
// PanelHD
|
// PanelHD
|
||||||
{"cmdProp0", "Hard drives/CD", "cmdDel0", "CDVol", "cmdProp1"},
|
{"cmdProp0", "Hard drives/CD", "cmdDel0", "chkCDTurbo", "cmdProp1"},
|
||||||
{"cmdDel0", "cmdProp0", "Hard drives/CD", "CDVol", "cmdDel1"},
|
{"cmdDel0", "cmdProp0", "Hard drives/CD", "chkCDTurbo", "cmdDel1"},
|
||||||
{"cmdProp1", "Hard drives/CD", "cmdDel1", "cmdProp0", "cmdProp2"},
|
{"cmdProp1", "Hard drives/CD", "cmdDel1", "cmdProp0", "cmdProp2"},
|
||||||
{"cmdDel1", "cmdProp1", "Hard drives/CD", "cmdDel0", "cmdDel2"},
|
{"cmdDel1", "cmdProp1", "Hard drives/CD", "cmdDel0", "cmdDel2"},
|
||||||
{"cmdProp2", "Hard drives/CD", "cmdDel2", "cmdProp1", "cmdProp3"},
|
{"cmdProp2", "Hard drives/CD", "cmdDel2", "cmdProp1", "cmdProp3"},
|
||||||
|
@ -196,13 +196,13 @@ static NavigationMap navMap[] =
|
||||||
{"cmdAddDir", "Hard drives/CD", "cmdAddHDF", "cmdProp4", "chkHDRO"},
|
{"cmdAddDir", "Hard drives/CD", "cmdAddHDF", "cmdProp4", "chkHDRO"},
|
||||||
{"cmdAddHDF", "cmdAddDir", "cmdCreateHDF", "cmdDel4", "chkHDRO"},
|
{"cmdAddHDF", "cmdAddDir", "cmdCreateHDF", "cmdDel4", "chkHDRO"},
|
||||||
{"cmdCreateHDF", "cmdAddHDF", "Hard drives / CD", "cmdDel4", "chkSCSI" },
|
{"cmdCreateHDF", "cmdAddHDF", "Hard drives / CD", "cmdDel4", "chkSCSI" },
|
||||||
{"chkHDRO", "Hard drives / CD", "chkSCSI", "cmdAddDir", "CD drive" },
|
{"chkHDRO", "Hard drives / CD", "chkSCSI", "cmdAddDir", "chkCD" },
|
||||||
{"chkSCSI", "chkHDRO", "Hard drives / CD", "cmdCreateHDF", "cdEject" },
|
{"chkSCSI", "chkHDRO", "Hard drives / CD", "cmdCreateHDF", "cdEject" },
|
||||||
{"CD drive", "Hard drives/CD", "cdEject", "chkHDRO", "cboCD"},
|
{"chkCD", "Hard drives/CD", "cdEject", "chkHDRO", "cboCD"},
|
||||||
{"cdEject", "CD drive", "CDSelect", "chkSCSI", "cboCD" },
|
{"cdEject", "chkCD", "CDSelect", "chkSCSI", "cboCD" },
|
||||||
{"CDSelect", "cdEject", "Hard drives/CD", "cmdCreateHDF", "cboCD"},
|
{"CDSelect", "cdEject", "Hard drives/CD", "cmdCreateHDF", "cboCD"},
|
||||||
{"cboCD", "Hard drives/CD", "Hard drives/CD", "CD drive", "CDVol"},
|
{"cboCD", "Hard drives/CD", "Hard drives/CD", "chkCD", "chkCDTurbo"},
|
||||||
{"CDVol", "", "", "cboCD", "cmdProp0"},
|
{ "chkCDTurbo", "Hard drives/CD", "Hard drives/CD", "cboCD", "cmdProp0" },
|
||||||
|
|
||||||
// active move left move right move up move down
|
// active move left move right move up move down
|
||||||
// PanelDisplay
|
// PanelDisplay
|
||||||
|
@ -234,17 +234,18 @@ static NavigationMap navMap[] =
|
||||||
|
|
||||||
// active move left move right move up move down
|
// active move left move right move up move down
|
||||||
//PanelSound
|
//PanelSound
|
||||||
{"sndDisable", "Sound", "sldPaulaVol", "cboFrequency", "sndDisEmu"},
|
{ "sndDisable", "Sound", "sldPaulaVol", "cboFrequency", "sndDisEmu" },
|
||||||
{"sndDisEmu", "Sound", "sldPaulaVol", "sndDisable", "sndEmulate"},
|
{ "sndDisEmu", "Sound", "sldPaulaVol", "sndDisable", "sndEmulate" },
|
||||||
{"sndEmulate", "Sound", "sldPaulaVol", "sndDisEmu", "sndEmuBest"},
|
{ "sndEmulate", "Sound", "sldPaulaVol", "sndDisEmu", "sndEmuBest" },
|
||||||
{"sndEmuBest", "Sound", "sldPaulaVol", "sndEmulate", "cboChannelMode"},
|
{ "sndEmuBest", "Sound", "sldPaulaVol", "sndEmulate", "cboChannelMode" },
|
||||||
{"cboChannelMode", "Sound", "cboSeparation", "sndEmuBest", "cboFrequency"},
|
{ "cboChannelMode", "Sound", "cboSeparation", "sndEmuBest", "cboFrequency" },
|
||||||
{"cboFrequency", "Sound", "cboFilter", "cboChannelMode", "sndDisable"},
|
{ "cboFrequency", "Sound", "cboFilter", "cboChannelMode", "sndDisable" },
|
||||||
{"cboInterpol", "cboSeparation", "Sound", "sldPaulaVol", "cboFilter"},
|
{ "cboInterpol", "cboSeparation", "Sound", "sldCDVol", "cboFilter" },
|
||||||
{"cboFilter", "Sound", "Sound", "cboInterpol", "sldPaulaVol"},
|
{ "cboFilter", "Sound", "Sound", "cboInterpol", "sldPaulaVol" },
|
||||||
{"cboSeparation", "cboChannelMode", "cboInterpol", "sndEmuBest", "cboStereoDelay"},
|
{ "cboSeparation", "cboChannelMode", "cboInterpol", "sndEmuBest", "cboStereoDelay" },
|
||||||
{"cboStereoDelay", "cboFrequency", "cboFilter", "cboSeparation", "sldPaulaVol"},
|
{ "cboStereoDelay", "cboFrequency", "cboFilter", "cboSeparation", "sldPaulaVol" },
|
||||||
{"sldPaulaVol", "", "", "cboStereoDelay", "cboInterpol"},
|
{ "sldPaulaVol", "", "", "cboStereoDelay", "sldCDVol" },
|
||||||
|
{ "sldCDVol", "", "", "sldPaulaVol", "cboInterpol" },
|
||||||
|
|
||||||
// active move left move right move up move down
|
// active move left move right move up move down
|
||||||
// PanelInput
|
// PanelInput
|
||||||
|
|
|
@ -59,9 +59,7 @@ static gcn::CheckBox* chkCD;
|
||||||
static gcn::DropDown* cboCDFile;
|
static gcn::DropDown* cboCDFile;
|
||||||
static gcn::Button* cmdCDEject;
|
static gcn::Button* cmdCDEject;
|
||||||
static gcn::Button* cmdCDSelect;
|
static gcn::Button* cmdCDSelect;
|
||||||
static gcn::Label* lblCDVol;
|
static gcn::CheckBox* chkCDTurbo;
|
||||||
static gcn::Label* lblCDVolInfo;
|
|
||||||
static gcn::Slider* sldCDVol;
|
|
||||||
|
|
||||||
static int GetHDType(const int index)
|
static int GetHDType(const int index)
|
||||||
{
|
{
|
||||||
|
@ -240,15 +238,17 @@ public:
|
||||||
chkScsi->setSelected(true);
|
chkScsi->setSelected(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (actionEvent.getSource() == chkCDTurbo)
|
||||||
|
changed_prefs.cd_speed = chkCDTurbo->isSelected() ? 0 : 100;
|
||||||
|
|
||||||
RefreshPanelHD();
|
RefreshPanelHD();
|
||||||
RefreshPanelQuickstart();
|
RefreshPanelQuickstart();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CDCheckActionListener* cdCheckActionListener;
|
CDCheckActionListener* cdCheckActionListener;
|
||||||
|
|
||||||
|
|
||||||
class CDButtonActionListener : public gcn::ActionListener
|
class CDButtonActionListener : public gcn::ActionListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -293,22 +293,12 @@ public:
|
||||||
|
|
||||||
CDButtonActionListener* cdButtonActionListener;
|
CDButtonActionListener* cdButtonActionListener;
|
||||||
|
|
||||||
|
|
||||||
class GenericActionListener : public gcn::ActionListener
|
class GenericActionListener : public gcn::ActionListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void action(const gcn::ActionEvent& actionEvent) override
|
void action(const gcn::ActionEvent& actionEvent) override
|
||||||
{
|
{
|
||||||
if (actionEvent.getSource() == sldCDVol)
|
if (actionEvent.getSource() == chkHDReadOnly)
|
||||||
{
|
|
||||||
const auto newvol = 100 - static_cast<int>(sldCDVol->getValue());
|
|
||||||
if (changed_prefs.sound_volume_cd != newvol)
|
|
||||||
{
|
|
||||||
changed_prefs.sound_volume_cd = newvol;
|
|
||||||
RefreshPanelHD();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (actionEvent.getSource() == chkHDReadOnly)
|
|
||||||
{
|
{
|
||||||
changed_prefs.harddrive_read_only = chkHDReadOnly->isSelected();
|
changed_prefs.harddrive_read_only = chkHDReadOnly->isSelected();
|
||||||
}
|
}
|
||||||
|
@ -438,9 +428,13 @@ void InitPanelHD(const struct _ConfigCategory& category)
|
||||||
chkScsi->addActionListener(genericActionListener);
|
chkScsi->addActionListener(genericActionListener);
|
||||||
|
|
||||||
chkCD = new gcn::CheckBox("CD drive");
|
chkCD = new gcn::CheckBox("CD drive");
|
||||||
chkCD->setId("CD drive");
|
chkCD->setId("chkCD");
|
||||||
chkCD->addActionListener(cdCheckActionListener);
|
chkCD->addActionListener(cdCheckActionListener);
|
||||||
|
|
||||||
|
chkCDTurbo = new gcn::CheckBox("CDTV/CDTV-CR/CD32 turbo CD read speed");
|
||||||
|
chkCDTurbo->setId("chkCDTurbo");
|
||||||
|
chkCDTurbo->addActionListener(cdCheckActionListener);
|
||||||
|
|
||||||
cmdCDEject = new gcn::Button("Eject");
|
cmdCDEject = new gcn::Button("Eject");
|
||||||
cmdCDEject->setSize(SMALL_BUTTON_WIDTH * 2, SMALL_BUTTON_HEIGHT);
|
cmdCDEject->setSize(SMALL_BUTTON_WIDTH * 2, SMALL_BUTTON_HEIGHT);
|
||||||
cmdCDEject->setBaseColor(gui_baseCol);
|
cmdCDEject->setBaseColor(gui_baseCol);
|
||||||
|
@ -460,17 +454,6 @@ void InitPanelHD(const struct _ConfigCategory& category)
|
||||||
cboCDFile->setId("cboCD");
|
cboCDFile->setId("cboCD");
|
||||||
cboCDFile->addActionListener(cdFileActionListener);
|
cboCDFile->addActionListener(cdFileActionListener);
|
||||||
|
|
||||||
lblCDVol = new gcn::Label("CD Volume:");
|
|
||||||
lblCDVol->setAlignment(gcn::Graphics::RIGHT);
|
|
||||||
sldCDVol = new gcn::Slider(0, 100);
|
|
||||||
sldCDVol->setSize(200, SLIDER_HEIGHT);
|
|
||||||
sldCDVol->setBaseColor(gui_baseCol);
|
|
||||||
sldCDVol->setMarkerLength(20);
|
|
||||||
sldCDVol->setStepLength(10);
|
|
||||||
sldCDVol->setId("CDVol");
|
|
||||||
sldCDVol->addActionListener(genericActionListener);
|
|
||||||
lblCDVolInfo = new gcn::Label("80 %");
|
|
||||||
|
|
||||||
int posX = DISTANCE_BORDER + 2 + SMALL_BUTTON_WIDTH + 34;
|
int posX = DISTANCE_BORDER + 2 + SMALL_BUTTON_WIDTH + 34;
|
||||||
for (col = 0; col < COL_COUNT; ++col)
|
for (col = 0; col < COL_COUNT; ++col)
|
||||||
{
|
{
|
||||||
|
@ -516,9 +499,7 @@ void InitPanelHD(const struct _ConfigCategory& category)
|
||||||
category.panel->add(cboCDFile, DISTANCE_BORDER, posY);
|
category.panel->add(cboCDFile, DISTANCE_BORDER, posY);
|
||||||
posY += cboCDFile->getHeight() + DISTANCE_NEXT_Y;
|
posY += cboCDFile->getHeight() + DISTANCE_NEXT_Y;
|
||||||
|
|
||||||
category.panel->add(lblCDVol, DISTANCE_BORDER, posY);
|
category.panel->add(chkCDTurbo, DISTANCE_BORDER, posY);
|
||||||
category.panel->add(sldCDVol, DISTANCE_BORDER + lblCDVol->getWidth() + 8, posY);
|
|
||||||
category.panel->add(lblCDVolInfo, sldCDVol->getX() + sldCDVol->getWidth() + 12, posY);
|
|
||||||
|
|
||||||
RefreshPanelHD();
|
RefreshPanelHD();
|
||||||
}
|
}
|
||||||
|
@ -550,9 +531,7 @@ void ExitPanelHD()
|
||||||
delete cmdCDEject;
|
delete cmdCDEject;
|
||||||
delete cmdCDSelect;
|
delete cmdCDSelect;
|
||||||
delete cboCDFile;
|
delete cboCDFile;
|
||||||
delete lblCDVol;
|
delete chkCDTurbo;
|
||||||
delete lblCDVolInfo;
|
|
||||||
delete sldCDVol;
|
|
||||||
|
|
||||||
delete cdCheckActionListener;
|
delete cdCheckActionListener;
|
||||||
delete cdButtonActionListener;
|
delete cdButtonActionListener;
|
||||||
|
@ -660,13 +639,7 @@ void RefreshPanelHD()
|
||||||
cmdCDEject->setEnabled(changed_prefs.cdslots[0].inuse);
|
cmdCDEject->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||||
cmdCDSelect->setEnabled(changed_prefs.cdslots[0].inuse);
|
cmdCDSelect->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||||
cboCDFile->setEnabled(changed_prefs.cdslots[0].inuse);
|
cboCDFile->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||||
sldCDVol->setEnabled(changed_prefs.cdslots[0].inuse);
|
chkCDTurbo->setSelected(changed_prefs.cd_speed == 0);
|
||||||
lblCDVol->setEnabled(changed_prefs.cdslots[0].inuse);
|
|
||||||
lblCDVolInfo->setEnabled(changed_prefs.cdslots[0].inuse);
|
|
||||||
|
|
||||||
sldCDVol->setValue(100 - changed_prefs.sound_volume_cd);
|
|
||||||
snprintf(tmp, 32, "%d %%", 100 - changed_prefs.sound_volume_cd);
|
|
||||||
lblCDVolInfo->setCaption(tmp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,9 @@ static gcn::Window* grpVolume;
|
||||||
static gcn::Label* lblPaulaVol;
|
static gcn::Label* lblPaulaVol;
|
||||||
static gcn::Label* lblPaulaVolInfo;
|
static gcn::Label* lblPaulaVolInfo;
|
||||||
static gcn::Slider* sldPaulaVol;
|
static gcn::Slider* sldPaulaVol;
|
||||||
|
static gcn::Label* lblCDVol;
|
||||||
|
static gcn::Label* lblCDVolInfo;
|
||||||
|
static gcn::Slider* sldCDVol;
|
||||||
|
|
||||||
static int curr_separation_idx;
|
static int curr_separation_idx;
|
||||||
static int curr_stereodelay_idx;
|
static int curr_stereodelay_idx;
|
||||||
|
@ -322,6 +325,12 @@ public:
|
||||||
if (changed_prefs.sound_volume_paula != newvol)
|
if (changed_prefs.sound_volume_paula != newvol)
|
||||||
changed_prefs.sound_volume_paula = newvol;
|
changed_prefs.sound_volume_paula = newvol;
|
||||||
}
|
}
|
||||||
|
else if (actionEvent.getSource() == sldCDVol)
|
||||||
|
{
|
||||||
|
const auto newvol = 100 - static_cast<int>(sldCDVol->getValue());
|
||||||
|
if (changed_prefs.sound_volume_cd != newvol)
|
||||||
|
changed_prefs.sound_volume_cd = newvol;
|
||||||
|
}
|
||||||
|
|
||||||
RefreshPanelSound();
|
RefreshPanelSound();
|
||||||
}
|
}
|
||||||
|
@ -415,6 +424,17 @@ void InitPanelSound(const struct _ConfigCategory& category)
|
||||||
sldPaulaVol->addActionListener(soundActionListener);
|
sldPaulaVol->addActionListener(soundActionListener);
|
||||||
lblPaulaVolInfo = new gcn::Label("100 %");
|
lblPaulaVolInfo = new gcn::Label("100 %");
|
||||||
|
|
||||||
|
lblCDVol = new gcn::Label("CD Volume:");
|
||||||
|
lblCDVol->setAlignment(gcn::Graphics::RIGHT);
|
||||||
|
sldCDVol = new gcn::Slider(0, 100);
|
||||||
|
sldCDVol->setSize(150, SLIDER_HEIGHT);
|
||||||
|
sldCDVol->setBaseColor(gui_baseCol);
|
||||||
|
sldCDVol->setMarkerLength(20);
|
||||||
|
sldCDVol->setStepLength(10);
|
||||||
|
sldCDVol->setId("sldCDVol");
|
||||||
|
sldCDVol->addActionListener(soundActionListener);
|
||||||
|
lblCDVolInfo = new gcn::Label("80 %");
|
||||||
|
|
||||||
grpSound = new gcn::Window("Sound Emulation");
|
grpSound = new gcn::Window("Sound Emulation");
|
||||||
grpSound->add(optSoundDisabled, 10, 10);
|
grpSound->add(optSoundDisabled, 10, 10);
|
||||||
grpSound->add(optSoundDisabledEmu, 10, 40);
|
grpSound->add(optSoundDisabledEmu, 10, 40);
|
||||||
|
@ -429,6 +449,9 @@ void InitPanelSound(const struct _ConfigCategory& category)
|
||||||
grpVolume->add(lblPaulaVol, 10, 10);
|
grpVolume->add(lblPaulaVol, 10, 10);
|
||||||
grpVolume->add(sldPaulaVol, lblPaulaVol->getX() + lblPaulaVol->getWidth() + 10, lblPaulaVol->getY());
|
grpVolume->add(sldPaulaVol, lblPaulaVol->getX() + lblPaulaVol->getWidth() + 10, lblPaulaVol->getY());
|
||||||
grpVolume->add(lblPaulaVolInfo, sldPaulaVol->getX() + sldPaulaVol->getWidth() + 10, sldPaulaVol->getY());
|
grpVolume->add(lblPaulaVolInfo, sldPaulaVol->getX() + sldPaulaVol->getWidth() + 10, sldPaulaVol->getY());
|
||||||
|
grpVolume->add(lblCDVol, lblPaulaVol->getX(), lblPaulaVol->getY() + lblPaulaVol->getHeight() + DISTANCE_NEXT_Y);
|
||||||
|
grpVolume->add(sldCDVol, sldPaulaVol->getX(), lblCDVol->getY());
|
||||||
|
grpVolume->add(lblCDVolInfo, sldCDVol->getX() + sldCDVol->getWidth() + 10, sldCDVol->getY());
|
||||||
grpVolume->setMovable(false);
|
grpVolume->setMovable(false);
|
||||||
grpVolume->setSize(category.panel->getWidth() - DISTANCE_BORDER * 2 - grpSound->getWidth() - DISTANCE_NEXT_X, grpSound->getHeight());
|
grpVolume->setSize(category.panel->getWidth() - DISTANCE_BORDER * 2 - grpSound->getWidth() - DISTANCE_NEXT_X, grpSound->getHeight());
|
||||||
grpVolume->setTitleBarHeight(TITLEBAR_HEIGHT);
|
grpVolume->setTitleBarHeight(TITLEBAR_HEIGHT);
|
||||||
|
@ -469,6 +492,12 @@ void ExitPanelSound()
|
||||||
delete optSoundEmulated;
|
delete optSoundEmulated;
|
||||||
delete optSoundEmulatedBest;
|
delete optSoundEmulatedBest;
|
||||||
delete grpSound;
|
delete grpSound;
|
||||||
|
delete lblPaulaVol;
|
||||||
|
delete lblPaulaVolInfo;
|
||||||
|
delete sldPaulaVol;
|
||||||
|
delete lblCDVol;
|
||||||
|
delete lblCDVolInfo;
|
||||||
|
delete sldCDVol;
|
||||||
delete grpVolume;
|
delete grpVolume;
|
||||||
delete lblChannelMode;
|
delete lblChannelMode;
|
||||||
delete cboChannelMode;
|
delete cboChannelMode;
|
||||||
|
@ -567,6 +596,14 @@ void RefreshPanelSound()
|
||||||
snprintf(tmp, sizeof tmp - 1, "%d %%", 100 - changed_prefs.sound_volume_paula);
|
snprintf(tmp, sizeof tmp - 1, "%d %%", 100 - changed_prefs.sound_volume_paula);
|
||||||
lblPaulaVolInfo->setCaption(tmp);
|
lblPaulaVolInfo->setCaption(tmp);
|
||||||
|
|
||||||
|
sldCDVol->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||||
|
lblCDVol->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||||
|
lblCDVolInfo->setEnabled(changed_prefs.cdslots[0].inuse);
|
||||||
|
|
||||||
|
sldCDVol->setValue(100 - changed_prefs.sound_volume_cd);
|
||||||
|
snprintf(tmp, 10, "%d %%", 100 - changed_prefs.sound_volume_cd);
|
||||||
|
lblCDVolInfo->setCaption(tmp);
|
||||||
|
|
||||||
cboChannelMode->setEnabled(changed_prefs.produce_sound > 0);
|
cboChannelMode->setEnabled(changed_prefs.produce_sound > 0);
|
||||||
lblFrequency->setEnabled(changed_prefs.produce_sound > 0);
|
lblFrequency->setEnabled(changed_prefs.produce_sound > 0);
|
||||||
cboFrequency->setEnabled(changed_prefs.produce_sound > 0);
|
cboFrequency->setEnabled(changed_prefs.produce_sound > 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue