mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 09:05:06 +01:00
-fixed music volume did not apply when changing it with the
sound menu in global options
This commit is contained in:
parent
a3bf8fff5a
commit
21078c74fb
@ -101,14 +101,14 @@ int CMenu::_configSnd(void)
|
|||||||
int musicVol = min(m_cfg.getInt("GENERAL", "sound_volume_music", 255) + step, 255);
|
int musicVol = min(m_cfg.getInt("GENERAL", "sound_volume_music", 255) + step, 255);
|
||||||
m_cfg.setInt("GENERAL", "sound_volume_music", musicVol);
|
m_cfg.setInt("GENERAL", "sound_volume_music", musicVol);
|
||||||
_showConfigSnd();
|
_showConfigSnd();
|
||||||
m_music.SetVolume(musicVol);
|
m_music.SetMaxVolume(musicVol);
|
||||||
}
|
}
|
||||||
else if (m_btnMgr.selected(m_configSndBtnMusicVolM))
|
else if (m_btnMgr.selected(m_configSndBtnMusicVolM))
|
||||||
{
|
{
|
||||||
int musicVol = max(m_cfg.getInt("GENERAL", "sound_volume_music", 255) - step, 0);
|
int musicVol = max(m_cfg.getInt("GENERAL", "sound_volume_music", 255) - step, 0);
|
||||||
m_cfg.setInt("GENERAL", "sound_volume_music", musicVol);
|
m_cfg.setInt("GENERAL", "sound_volume_music", musicVol);
|
||||||
_showConfigSnd();
|
_showConfigSnd();
|
||||||
m_music.SetVolume(musicVol);
|
m_music.SetMaxVolume(musicVol);
|
||||||
}
|
}
|
||||||
else if (m_btnMgr.selected(m_configSndBtnCFVolP))
|
else if (m_btnMgr.selected(m_configSndBtnCFVolP))
|
||||||
{
|
{
|
||||||
|
@ -50,6 +50,12 @@ void MusicPlayer::ScanDirectories(const char *directory)
|
|||||||
closedir(pdir);
|
closedir(pdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MusicPlayer::SetMaxVolume(u8 volume)
|
||||||
|
{
|
||||||
|
m_music_volume = volume;
|
||||||
|
SetVolume(volume);
|
||||||
|
}
|
||||||
|
|
||||||
void MusicPlayer::SetVolume(u8 volume)
|
void MusicPlayer::SetVolume(u8 volume)
|
||||||
{
|
{
|
||||||
m_music_current_volume = volume;
|
m_music_current_volume = volume;
|
||||||
|
@ -15,6 +15,7 @@ public:
|
|||||||
void Tick(bool attenuate);
|
void Tick(bool attenuate);
|
||||||
|
|
||||||
void SetVolume(u8 volume);
|
void SetVolume(u8 volume);
|
||||||
|
void SetMaxVolume(u8 volume);
|
||||||
u8 GetVolume() { return m_music_current_volume; };
|
u8 GetVolume() { return m_music_current_volume; };
|
||||||
u8 GetMaxVolume() { return m_music_volume; };
|
u8 GetMaxVolume() { return m_music_volume; };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user