summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-06-28 22:05:41 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-07-02 00:36:41 +0200
commit416ea27305df71f0d05b3668403c3595c8ead064 (patch)
treefc8b7b60c8c01d83d23c8e61c25cbb51604caa09 /src
parent65bb4cb9aee68705f3db42d587372d217a17e152 (diff)
downloadfork-godot-webrtc-native-416ea27305df71f0d05b3668403c3595c8ead064.tar.gz
fork-godot-webrtc-native-416ea27305df71f0d05b3668403c3595c8ead064.tar.bz2
fork-godot-webrtc-native-416ea27305df71f0d05b3668403c3595c8ead064.zip
Fix API breakage after godot cpp 3.2 bump.
Diffstat (limited to 'src')
-rw-r--r--src/WebRTCLibDataChannel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/WebRTCLibDataChannel.cpp b/src/WebRTCLibDataChannel.cpp
index ede89a9..d64d082 100644
--- a/src/WebRTCLibDataChannel.cpp
+++ b/src/WebRTCLibDataChannel.cpp
@@ -1,5 +1,8 @@
#include "WebRTCLibDataChannel.hpp"
+#include "GDNativeLibrary.hpp"
+#include "NativeScript.hpp"
+
using namespace godot_webrtc;
// Channel observer
@@ -26,12 +29,12 @@ WebRTCLibDataChannel *WebRTCLibDataChannel::new_data_channel(rtc::scoped_refptr<
godot::WebRTCDataChannelGDNative *out = godot::WebRTCDataChannelGDNative::_new();
// Set our implementation as it's script
godot::NativeScript *script = godot::NativeScript::_new();
- script->set_library(godot::get_wrapper<godot::GDNativeLibrary>((godot_object *)godot::gdnlib));
+ script->set_library(godot::detail::get_wrapper<godot::GDNativeLibrary>((godot_object *)godot::gdnlib));
script->set_class_name("WebRTCLibDataChannel");
out->set_script(script);
// Bind the data channel to the ScriptInstance userdata (our script)
- WebRTCLibDataChannel *tmp = godot::as<WebRTCLibDataChannel>(out);
+ WebRTCLibDataChannel *tmp = out->cast_to<WebRTCLibDataChannel>(out);
tmp->bind_channel(p_channel);
return tmp;