diff options
| author | Tilka <tilkax@gmail.com> | 2021-08-31 03:54:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-31 03:54:06 +0100 |
| commit | e69f7e7c777c9dc9e2182bb012cb4882fe89ca8f (patch) | |
| tree | e7ecd682550844cd5b835bfc7a8ae08380fcb092 /Source/Core | |
| parent | c2c30b4d50a9eb9b29bd52320505d603de73d87f (diff) | |
| parent | 72ca41b9bf0a950b37863c788ea64e71d83443dc (diff) | |
Merge pull request #10072 from Tilka/dsp_cycles
DSPInterpreter: fix off-by-one errors in cycle counting
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp b/Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp index d0cb74f764..88e6f2ce65 100644 --- a/Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp +++ b/Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp @@ -76,7 +76,7 @@ int Interpreter::RunCyclesThread(int cycles) Step(); cycles--; - if (cycles < 0) + if (cycles <= 0) return 0; } } @@ -99,7 +99,7 @@ int Interpreter::RunCyclesDebug(int cycles) } Step(); cycles--; - if (cycles < 0) + if (cycles <= 0) return 0; } @@ -123,7 +123,7 @@ int Interpreter::RunCyclesDebug(int cycles) Step(); cycles--; - if (cycles < 0) + if (cycles <= 0) return 0; } @@ -137,7 +137,7 @@ int Interpreter::RunCyclesDebug(int cycles) } Step(); cycles--; - if (cycles < 0) + if (cycles <= 0) return 0; // We don't bother directly supporting pause - if the main emu pauses, // it just won't call this function anymore. @@ -160,7 +160,7 @@ int Interpreter::RunCycles(int cycles) Step(); cycles--; - if (cycles < 0) + if (cycles <= 0) return 0; } @@ -179,7 +179,7 @@ int Interpreter::RunCycles(int cycles) Step(); cycles--; - if (cycles < 0) + if (cycles <= 0) return 0; } @@ -188,7 +188,7 @@ int Interpreter::RunCycles(int cycles) { Step(); cycles--; - if (cycles < 0) + if (cycles <= 0) return 0; // We don't bother directly supporting pause - if the main emu pauses, // it just won't call this function anymore. |
