From a137cc406b3f91c7cd94fb6ac00815718cac1c09 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 10 Feb 2023 13:46:03 +1000 Subject: [PATCH] Allow `EmuClientApi.SpeedMode(6400)` (to match GUI; Lua max was 6399) logic broken since introduction in 858f133f9, though the limit wasn't 6400% at the time, that was changed in 5f9757d7d --- src/BizHawk.Client.Common/Api/Classes/EmuClientApi.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Client.Common/Api/Classes/EmuClientApi.cs b/src/BizHawk.Client.Common/Api/Classes/EmuClientApi.cs index 1c507ddb5f..396f87c7e6 100644 --- a/src/BizHawk.Client.Common/Api/Classes/EmuClientApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/EmuClientApi.cs @@ -211,7 +211,7 @@ namespace BizHawk.Client.Common public void SpeedMode(int percent) { - if (percent.StrictlyBoundedBy(0.RangeTo(6400))) _mainForm.ClickSpeedItem(percent); + if (percent is > 0 and <= 6400) _mainForm.ClickSpeedItem(percent); else _logCallback("Invalid speed value"); }