Skip to content

Commit

Permalink
GUIFormSpecMenu: Fix parameter order
Browse files Browse the repository at this point in the history
Fixes a regression caused by e51f474 because C++ implicitly converts boolean to float. no matter what.
  • Loading branch information
SmallJoker committed Jul 10, 2022
1 parent fae8726 commit 8724fe6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/guiFormSpecMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4498,7 +4498,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
if ((s.ftype == f_TabHeader) &&
(s.fid == event.GUIEvent.Caller->getID())) {
if (!s.sound.empty() && m_sound_manager)
m_sound_manager->playSound(SimpleSoundSpec(s.sound, false, 1.0f));
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
s.send = true;
acceptInput();
s.send = false;
Expand Down Expand Up @@ -4543,7 +4543,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)

if (s.ftype == f_Button || s.ftype == f_CheckBox) {
if (!s.sound.empty() && m_sound_manager)
m_sound_manager->playSound(SimpleSoundSpec(s.sound, false, 1.0f));
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));

s.send = true;
if (s.is_exit) {
Expand All @@ -4568,7 +4568,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
}
}
if (!s.sound.empty() && m_sound_manager)
m_sound_manager->playSound(SimpleSoundSpec(s.sound, false, 1.0f));
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
s.send = true;
acceptInput(quit_mode_no);

Expand All @@ -4586,7 +4586,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
s.fdefault = L"";
} else if (s.ftype == f_Unknown || s.ftype == f_HyperText) {
if (!s.sound.empty() && m_sound_manager)
m_sound_manager->playSound(SimpleSoundSpec(s.sound, false, 1.0f));
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
s.send = true;
acceptInput();
s.send = false;
Expand Down

0 comments on commit 8724fe6

Please sign in to comment.