Skip to content
This repository was archived by the owner on Jan 31, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bHapticsManager/bHapticsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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());
}
Expand Down