Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pkdawson committed Sep 9, 2024
1 parent 1b58907 commit 14eb84c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ public RdRendererThreadSafe()
}

// if a frame was skipped, free old data
var oldData = Interlocked.Exchange(ref _dataToDraw, newData);
var oldData = System.Threading.Interlocked.Exchange(ref _dataToDraw, newData);
oldData?.Dispose();
}

private SharedList TakeSharedData()
{
var rv = Interlocked.Exchange(ref _dataToDraw, null);
var rv = System.Threading.Interlocked.Exchange(ref _dataToDraw, null);
return rv ?? [];
}

Expand Down
4 changes: 2 additions & 2 deletions gdext/src/RdRendererThreadSafe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <godot_cpp/classes/display_server.hpp>
#include <godot_cpp/classes/engine.hpp>
#include <godot_cpp/classes/rendering_server.hpp>
#include <godot_cpp/variant/utility_functions.hpp>
#include <mutex>

using namespace godot;
Expand Down Expand Up @@ -69,8 +70,7 @@ RdRendererThreadSafe::RdRendererThreadSafe() : impl(std::make_unique<Impl>())

if (DisplayServer::get_singleton()->window_get_vsync_mode() == DisplayServer::VSYNC_DISABLED)
{
UtilityFunctions::push_warning(
"[imgui-godot] Multi-threaded renderer with vsync disabled will probably crash");
UtilityFunctions::push_warning("[imgui-godot] Multi-threaded renderer with vsync disabled will probably crash");
}
}

Expand Down

0 comments on commit 14eb84c

Please sign in to comment.