mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 19:31:58 +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);
|
||||
m_cfg.setInt("GENERAL", "sound_volume_music", musicVol);
|
||||
_showConfigSnd();
|
||||
m_music.SetVolume(musicVol);
|
||||
m_music.SetMaxVolume(musicVol);
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnMusicVolM))
|
||||
{
|
||||
int musicVol = max(m_cfg.getInt("GENERAL", "sound_volume_music", 255) - step, 0);
|
||||
m_cfg.setInt("GENERAL", "sound_volume_music", musicVol);
|
||||
_showConfigSnd();
|
||||
m_music.SetVolume(musicVol);
|
||||
m_music.SetMaxVolume(musicVol);
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnCFVolP))
|
||||
{
|
||||
|
@ -50,6 +50,12 @@ void MusicPlayer::ScanDirectories(const char *directory)
|
||||
closedir(pdir);
|
||||
}
|
||||
|
||||
void MusicPlayer::SetMaxVolume(u8 volume)
|
||||
{
|
||||
m_music_volume = volume;
|
||||
SetVolume(volume);
|
||||
}
|
||||
|
||||
void MusicPlayer::SetVolume(u8 volume)
|
||||
{
|
||||
m_music_current_volume = volume;
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
void Tick(bool attenuate);
|
||||
|
||||
void SetVolume(u8 volume);
|
||||
void SetMaxVolume(u8 volume);
|
||||
u8 GetVolume() { return m_music_current_volume; };
|
||||
u8 GetMaxVolume() { return m_music_volume; };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user