From 7cca955fc55e83d1c528a2b105f3815af4783adc Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 14 Aug 2025 20:26:33 +0000 Subject: [PATCH] Update leenkx/Sources/iron/App.hx --- leenkx/Sources/iron/App.hx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/leenkx/Sources/iron/App.hx b/leenkx/Sources/iron/App.hx index 1141187..eb43845 100644 --- a/leenkx/Sources/iron/App.hx +++ b/leenkx/Sources/iron/App.hx @@ -54,6 +54,23 @@ class App { if (Scene.active == null || !Scene.active.ready) return; iron.system.Time.update(); + + + if (lastw == -1) { + lastw = App.w(); + lasth = App.h(); + } + if (lastw != App.w() || lasth != App.h()) { + if (onResize != null) onResize(); + else { + if (Scene.active != null && Scene.active.camera != null) { + Scene.active.camera.buildProjection(); + } + } + } + lastw = App.w(); + lasth = App.h(); + if (pauseUpdates) return; #if lnx_debug