From cb2be8723a16f9fdb13582562cb630c945dcd0a7 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 30 Jun 2023 11:44:33 +0200 Subject: Support building for Godot 4.1 (new default). --- src/WebRTCLibPeerConnection.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/WebRTCLibPeerConnection.cpp') diff --git a/src/WebRTCLibPeerConnection.cpp b/src/WebRTCLibPeerConnection.cpp index a372644..effc1d7 100644 --- a/src/WebRTCLibPeerConnection.cpp +++ b/src/WebRTCLibPeerConnection.cpp @@ -180,7 +180,11 @@ Error WebRTCLibPeerConnection::_initialize(const Dictionary &p_config) { return _create_pc(config); } +#if defined(GDNATIVE_WEBRTC) || defined(GDEXTENSION_WEBRTC_40) Object *WebRTCLibPeerConnection::_create_data_channel(const String &p_channel, const Dictionary &p_channel_config) try { +#else +Ref WebRTCLibPeerConnection::_create_data_channel(const String &p_channel, const Dictionary &p_channel_config) try { +#endif ERR_FAIL_COND_V(!peer_connection, nullptr); // Read config from dictionary -- cgit v1.2.3