From 52270d5028c907ad675e113c29b0301fc00999dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 03:37:25 +0000 Subject: [PATCH 1/2] Initial plan From f733e225cd1a7f8fdb1494ff76ee589c57b5da5d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 03:42:39 +0000 Subject: [PATCH 2/2] Use explicit comparison for Interlocked.CompareExchange instead of negation Co-authored-by: nalathethird <36301692+nalathethird@users.noreply.github.com> --- bHapticsManager/bHapticsManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bHapticsManager/bHapticsManager.cs b/bHapticsManager/bHapticsManager.cs index c92cbc7..061ac59 100644 --- a/bHapticsManager/bHapticsManager.cs +++ b/bHapticsManager/bHapticsManager.cs @@ -130,7 +130,7 @@ void WorldFocusedHandler(World world) if (world != null) { // Check if initialization is needed and atomically set _initialized to true - if (!Interlocked.CompareExchange(ref _initialized, true, false)) + if (Interlocked.CompareExchange(ref _initialized, true, false) == false) { try { @@ -154,7 +154,7 @@ void WorldFocusedHandler(World world) else { // Check if initialization is needed and atomically set _initialized to true - if (!Interlocked.CompareExchange(ref _initialized, true, false)) + if (Interlocked.CompareExchange(ref _initialized, true, false) == false) { focusedWorld.RunSynchronously(() => InitializeHaptics()); }