fix wrong window size

This commit is contained in:
Nordup 2024-07-19 04:17:30 +04:00
parent ba96896507
commit c545b69a0d
2 changed files with 6 additions and 2 deletions

View file

@ -19,6 +19,10 @@ static func is_linux() -> bool:
return get_platform() == LINUX_BSD return get_platform() == LINUX_BSD
static func is_macos() -> bool:
return get_platform() == MACOS
static func is_debug() -> bool: static func is_debug() -> bool:
return OS.is_debug_build() return OS.is_debug_build()

View file

@ -8,8 +8,8 @@ class_name RenderResult
var ext_texure: ExternalTexture var ext_texure: ExternalTexture
var texture_rid: RID var texture_rid: RID
@onready var width: int = int(ui_events.current_ui_size.x) @onready var width: int = get_viewport().size.x / (2 if Platform.is_macos() else 1)
@onready var height: int = int(ui_events.current_ui_size.y) @onready var height: int = get_viewport().size.y / (2 if Platform.is_macos() else 1)
func _ready() -> void: func _ready() -> void: