From 4ce7b4a10c9d564956390ab70cf04e509fbe6163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 18 Oct 2026 22:08:37 +0300 Subject: [PATCH] no freeze --- components/root/mac/view/RaylibGLView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/root/mac/view/RaylibGLView.swift b/components/root/mac/view/RaylibGLView.swift index 1d01801..e9d4008 100644 --- a/components/root/mac/view/RaylibGLView.swift +++ b/components/root/mac/view/RaylibGLView.swift @@ -69,9 +69,11 @@ final class RaylibGLNSView: NSOpenGLView { private func startRenderTimer() { guard renderTimer == nil else { return } - renderTimer = Timer.scheduledTimer(withTimeInterval: 1.0 / 60.0, repeats: true) { [weak self] _ in + let timer = Timer(timeInterval: 1.0 / 60.0, repeats: true) { [weak self] _ in self?.needsDisplay = true } + RunLoop.main.add(timer, forMode: .common) + renderTimer = timer } private func loadModel() {