GTK : Some preparation for the future sound config dialog
This commit is contained in:
parent
de45a83c47
commit
702f357082
|
@ -958,6 +958,38 @@ void Window::vApplyConfigFilterIB()
|
|||
}
|
||||
}
|
||||
|
||||
void Window::vApplyConfigMute()
|
||||
{
|
||||
bool bMute = m_poSoundConfig->oGetKey<bool>("mute");
|
||||
if (bMute)
|
||||
{
|
||||
soundSetEnable(0x000);
|
||||
}
|
||||
else
|
||||
{
|
||||
soundSetEnable(0x30f);
|
||||
}
|
||||
}
|
||||
|
||||
void Window::vApplyConfigVolume()
|
||||
{
|
||||
float fSoundVolume = m_poSoundConfig->oGetKey<float>("volume");
|
||||
soundSetVolume(fSoundVolume);
|
||||
}
|
||||
|
||||
void Window::vApplyConfigSoundQuality()
|
||||
{
|
||||
m_eSoundQuality = (ESoundQuality)m_poSoundConfig->oGetKey<int>("quality");
|
||||
if (m_eCartridge == CartridgeGBA)
|
||||
{
|
||||
soundSetQuality(m_eSoundQuality);
|
||||
}
|
||||
else if (m_eCartridge == CartridgeGB)
|
||||
{
|
||||
gbSoundSetQuality(m_eSoundQuality);
|
||||
}
|
||||
}
|
||||
|
||||
void Window::vHistoryAdd(const std::string & _rsFile)
|
||||
{
|
||||
std::string sURL = "file://" + _rsFile;
|
||||
|
|
|
@ -79,6 +79,9 @@ public:
|
|||
void vApplyConfigFilter();
|
||||
void vApplyConfigFilterIB();
|
||||
void vApplyConfigScreenArea();
|
||||
void vApplyConfigMute();
|
||||
void vApplyConfigVolume();
|
||||
void vApplyConfigSoundQuality();
|
||||
void vUpdateScreen();
|
||||
|
||||
inline ECartridge eGetCartridge() const { return m_eCartridge; }
|
||||
|
|
|
@ -474,15 +474,8 @@ void Window::vOnFlashSizeToggled(Gtk::CheckMenuItem * _poCMI, int _iFlashSize)
|
|||
void Window::vOnSoundMuteToggled(Gtk::CheckMenuItem * _poCMI)
|
||||
{
|
||||
bool bMute = _poCMI->get_active();
|
||||
if (bMute)
|
||||
{
|
||||
soundSetEnable(0x000);
|
||||
}
|
||||
else
|
||||
{
|
||||
soundSetEnable(0x30f);
|
||||
}
|
||||
m_poSoundConfig->vSetKey("mute", bMute);
|
||||
vApplyConfigMute();
|
||||
}
|
||||
|
||||
void Window::vOnSoundQualityToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundQuality)
|
||||
|
@ -492,16 +485,8 @@ void Window::vOnSoundQualityToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundQual
|
|||
return;
|
||||
}
|
||||
|
||||
m_eSoundQuality = (ESoundQuality)_iSoundQuality;
|
||||
if (m_eCartridge == CartridgeGBA)
|
||||
{
|
||||
soundSetQuality(_iSoundQuality);
|
||||
}
|
||||
else if (m_eCartridge == CartridgeGB)
|
||||
{
|
||||
gbSoundSetQuality(_iSoundQuality);
|
||||
}
|
||||
m_poSoundConfig->vSetKey("quality", _iSoundQuality);
|
||||
vApplyConfigSoundQuality();
|
||||
}
|
||||
|
||||
void Window::vOnSoundVolumeToggled(Gtk::CheckMenuItem * _poCMI, float _fSoundVolume)
|
||||
|
@ -511,8 +496,8 @@ void Window::vOnSoundVolumeToggled(Gtk::CheckMenuItem * _poCMI, float _fSoundVol
|
|||
return;
|
||||
}
|
||||
|
||||
soundSetVolume(_fSoundVolume);
|
||||
m_poSoundConfig->vSetKey("volume", _fSoundVolume);
|
||||
vApplyConfigVolume();
|
||||
}
|
||||
|
||||
void Window::vOnGBBorderToggled(Gtk::CheckMenuItem * _poCMI)
|
||||
|
|
Loading…
Reference in New Issue