Cleanup some GLOBAL_DEFs
This commit is contained in:
@ -42,11 +42,7 @@ void initialize_webrtc_module(ModuleInitializationLevel p_level) {
|
||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
return;
|
||||
}
|
||||
|
||||
#define SET_HINT(NAME, _VAL_, _MAX_) \
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater"), _VAL_);
|
||||
|
||||
SET_HINT(WRTC_IN_BUF, 64, 4096);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/limits/webrtc/max_channel_in_buffer_kb", PROPERTY_HINT_RANGE, "2,4096,1,or_greater"), 64);
|
||||
|
||||
ClassDB::register_custom_instance_class<WebRTCPeerConnection>();
|
||||
GDREGISTER_CLASS(WebRTCPeerConnectionExtension);
|
||||
@ -55,8 +51,6 @@ void initialize_webrtc_module(ModuleInitializationLevel p_level) {
|
||||
GDREGISTER_CLASS(WebRTCDataChannelExtension);
|
||||
|
||||
GDREGISTER_CLASS(WebRTCMultiplayerPeer);
|
||||
|
||||
#undef SET_HINT
|
||||
}
|
||||
|
||||
void uninitialize_webrtc_module(ModuleInitializationLevel p_level) {
|
||||
|
||||
@ -61,7 +61,7 @@ void WebRTCDataChannel::_bind_methods() {
|
||||
}
|
||||
|
||||
WebRTCDataChannel::WebRTCDataChannel() {
|
||||
_in_buffer_shift = nearest_shift((int)GLOBAL_GET(WRTC_IN_BUF) - 1) + 10;
|
||||
_in_buffer_shift = nearest_shift((int)GLOBAL_GET("network/limits/webrtc/max_channel_in_buffer_kb") - 1) + 10;
|
||||
}
|
||||
|
||||
WebRTCDataChannel::~WebRTCDataChannel() {
|
||||
|
||||
@ -33,8 +33,6 @@
|
||||
|
||||
#include "core/io/packet_peer.h"
|
||||
|
||||
#define WRTC_IN_BUF PNAME("network/limits/webrtc/max_channel_in_buffer_kb")
|
||||
|
||||
class WebRTCDataChannel : public PacketPeer {
|
||||
GDCLASS(WebRTCDataChannel, PacketPeer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user