Skip to content

Commit

Permalink
Fixes state.
Browse files Browse the repository at this point in the history
  • Loading branch information
shenweip committed Nov 24, 2020
1 parent 9a85ab2 commit be0449d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Core/HLE/sceUsbMic.cpp
Expand Up @@ -120,6 +120,7 @@ void __UsbMicDoState(PointerWrap &p) {
if (!s) {
return;
}
bool isMicStartedNow = Microphone::isMicStarted();
Do(p, numNeedSamples);
Do(p, waitingThreads);
Do(p, isNeedInput);
Expand All @@ -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<u32>({ curSampleRate, curChannels }));
Expand Down

0 comments on commit be0449d

Please sign in to comment.