mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-23 08:17:34 -04:00
scene reload hotfix 144hz
This commit is contained in:
parent
1b19455a31
commit
df01c521a7
2 changed files with 7 additions and 2 deletions
|
@ -7,7 +7,7 @@ var c_gate: ConfigGate
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
FileDownloader.progress.connect(gate_events.download_progress_emit)
|
FileDownloader.progress.connect(on_progress)
|
||||||
load_gate(gate_events.current_gate_url)
|
load_gate(gate_events.current_gate_url)
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,6 +39,10 @@ func error(code: GateEvents.GateError) -> void:
|
||||||
gate_events.gate_error_emit(code)
|
gate_events.gate_error_emit(code)
|
||||||
|
|
||||||
|
|
||||||
|
func on_progress(url: String, body_size: int, downloaded_bytes: int) -> void:
|
||||||
|
gate_events.download_progress_emit(url, body_size, downloaded_bytes)
|
||||||
|
|
||||||
|
|
||||||
func _exit_tree() -> void:
|
func _exit_tree() -> void:
|
||||||
FileDownloader.progress.disconnect(gate_events.download_progress_emit)
|
FileDownloader.progress.disconnect(on_progress)
|
||||||
FileDownloader.stop_all()
|
FileDownloader.stop_all()
|
||||||
|
|
|
@ -56,6 +56,7 @@ func create_external_texture() -> void:
|
||||||
# So need to wait to free that up
|
# So need to wait to free that up
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
|
await get_tree().process_frame
|
||||||
|
|
||||||
ext_texure = ExternalTexture.new()
|
ext_texure = ExternalTexture.new()
|
||||||
var err = ext_texure.create(t_format, t_view, [image.get_data()])
|
var err = ext_texure.create(t_format, t_view, [image.get_data()])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue