diff --git a/app/scripts/platform.gd b/app/scripts/platform.gd index c52d77a..9e6b3ad 100644 --- a/app/scripts/platform.gd +++ b/app/scripts/platform.gd @@ -19,6 +19,10 @@ static func is_linux() -> bool: return get_platform() == LINUX_BSD +static func is_macos() -> bool: + return get_platform() == MACOS + + static func is_debug() -> bool: return OS.is_debug_build() diff --git a/app/scripts/sandbox/render_result.gd b/app/scripts/sandbox/render_result.gd index dfc246a..0fa0bce 100644 --- a/app/scripts/sandbox/render_result.gd +++ b/app/scripts/sandbox/render_result.gd @@ -8,8 +8,8 @@ class_name RenderResult var ext_texure: ExternalTexture var texture_rid: RID -@onready var width: int = int(ui_events.current_ui_size.x) -@onready var height: int = int(ui_events.current_ui_size.y) +@onready var width: int = get_viewport().size.x / (2 if Platform.is_macos() else 1) +@onready var height: int = get_viewport().size.y / (2 if Platform.is_macos() else 1) func _ready() -> void: