From 81416e684ff0cb0e3c0d4886e6ef9b708210672e Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:28:34 +0200 Subject: [PATCH] Fix DWordWatches not being pokable with binary display type - closes #4045 --- src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs b/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs index 3e3f623bd7..0f42334286 100644 --- a/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs @@ -81,6 +81,7 @@ namespace BizHawk.Client.Common WatchDisplayType.FixedPoint_20_12 => (uint)(double.Parse(value, NumberFormatInfo.InvariantInfo) * 4096.0), WatchDisplayType.FixedPoint_16_16 => (uint)(double.Parse(value, NumberFormatInfo.InvariantInfo) * 65536.0), WatchDisplayType.Float => NumberExtensions.ReinterpretAsUInt32(float.Parse(value, NumberFormatInfo.InvariantInfo)), + WatchDisplayType.Binary => Convert.ToUInt32(value, 2), _ => 0 };