Skip to content

Commit

Permalink
Fix issue with two sounds played at same time
Browse files Browse the repository at this point in the history
  • Loading branch information
Isarhamster committed Apr 3, 2024
1 parent 1e85f7d commit 183e7e7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/gui/mainwindowactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,9 +1091,9 @@ void MainWindow::doBoardMove(Move m, unsigned int button, Square from, Square to
}

game().addMove(m, annot);
playMoveSound("move", m);
if (qobject_cast<FicsDatabase*>(database()))
{
playMoveSound("move", m);
m_ficsConsole->SendMove(m.toAlgebraic());
}
else
Expand All @@ -1114,6 +1114,10 @@ void MainWindow::doBoardMove(Move m, unsigned int button, Square from, Square to
}
setResultForCurrentPosition();
}
else
{
playMoveSound("move", m);
}
}
else
{
Expand All @@ -1124,6 +1128,10 @@ void MainWindow::doBoardMove(Move m, unsigned int button, Square from, Square to
playSound("fanfare");
slotStatusMessage(s);
}
else
{
playMoveSound("move", m);
}
}
}
}
Expand Down

0 comments on commit 183e7e7

Please sign in to comment.