diff options
| author | Caian Benedicto <caianbene@gmail.com> | 2021-04-02 10:42:25 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-02 15:42:25 +0200 |
| commit | 9ae60207c4e93388b97e10af5ead090a038f8a7c (patch) | |
| tree | e7dd69c90fda48c44921ced8ca94c3592241c020 /Ryujinx.HLE/HOS/TamperMachine.cs | |
| parent | 524fe3bea4ddcb2587ebde06c803645a0bfcd5c2 (diff) | |
Fix Tamper Machine crash and timings (#2159)
* Add missing return
* Change TamperMachine sleep to 83ms
* Change constant name to PascalCase
Diffstat (limited to 'Ryujinx.HLE/HOS/TamperMachine.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/TamperMachine.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/TamperMachine.cs b/Ryujinx.HLE/HOS/TamperMachine.cs index 77e27401..9cdea94a 100644 --- a/Ryujinx.HLE/HOS/TamperMachine.cs +++ b/Ryujinx.HLE/HOS/TamperMachine.cs @@ -13,6 +13,10 @@ namespace Ryujinx.HLE.HOS { public class TamperMachine { + // Atmosphere specifies a delay of 83 milliseconds between the execution of the last + // cheat and the re-execution of the first one. + private const int TamperMachineSleepMs = 1000 / 12; + private Thread _tamperThread = null; private ConcurrentQueue<ITamperProgram> _programs = new ConcurrentQueue<ITamperProgram>(); private long _pressedKeys = 0; @@ -76,7 +80,7 @@ namespace Ryujinx.HLE.HOS if (sleepCounter == 0) { sleepCounter = _programs.Count; - Thread.Sleep(1); + Thread.Sleep(TamperMachineSleepMs); } else { |
