Qt: Fix rumble not stopping on power off

This commit is contained in:
Connor McLaughlin 2020-05-01 16:42:43 +10:00
parent 6ecc1c684a
commit 2d6bdc1f82
2 changed files with 2 additions and 2 deletions

View File

@ -444,7 +444,7 @@ void QtHostInterface::OnSystemPaused(bool paused)
void QtHostInterface::OnSystemDestroyed() void QtHostInterface::OnSystemDestroyed()
{ {
HostInterface::OnSystemDestroyed(); CommonHostInterface::OnSystemDestroyed();
startBackgroundControllerPollTimer(); startBackgroundControllerPollTimer();
emit emulationStopped(); emit emulationStopped();

View File

@ -517,7 +517,7 @@ void CommonHostInterface::StopControllerRumble()
{ {
for (ControllerRumbleState& rumble : m_controller_vibration_motors) for (ControllerRumbleState& rumble : m_controller_vibration_motors)
{ {
bool changed = true; bool changed = false;
for (u32 i = 0; i < rumble.num_motors; i++) for (u32 i = 0; i < rumble.num_motors; i++)
{ {
changed |= (rumble.last_strength[i] != 0.0f); changed |= (rumble.last_strength[i] != 0.0f);