From be0449d16de5c4b717c82b1bd5ba256151a44a3b Mon Sep 17 00:00:00 2001 From: shenweip <1037567878@qq.com> Date: Tue, 24 Nov 2020 17:28:31 +0800 Subject: [PATCH] Fixes state. --- Core/HLE/sceUsbMic.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceUsbMic.cpp b/Core/HLE/sceUsbMic.cpp index 52f96c9609db..ed7fe29e9bc9 100644 --- a/Core/HLE/sceUsbMic.cpp +++ b/Core/HLE/sceUsbMic.cpp @@ -120,6 +120,7 @@ void __UsbMicDoState(PointerWrap &p) { if (!s) { return; } + bool isMicStartedNow = Microphone::isMicStarted(); Do(p, numNeedSamples); Do(p, waitingThreads); Do(p, isNeedInput); @@ -143,10 +144,10 @@ void __UsbMicDoState(PointerWrap &p) { } if (micState == 0) { - if (Microphone::isMicStarted()) + if (isMicStartedNow) Microphone::stopMic(); } else if (micState == 1) { - if (Microphone::isMicStarted()) { + if (isMicStartedNow) { // Ok, started. } else { Microphone::startMic(new std::vector({ curSampleRate, curChannels }));