diff --git a/src/types.nim b/src/types.nim index 10ac33a..566811d 100644 --- a/src/types.nim +++ b/src/types.nim @@ -898,14 +898,15 @@ type BlendLoader* = ref object of Loader (string, seq[Varying], OrderedTable[string, string], OrderedTable[string, TexturePixels])] ## private resource*: LoadableResource -template enqueue*(renderer: RenderManager, fun: proc()) = +template enqueue*(renderer: RenderManager, fun: untyped) = ## Run a proc after the renderer has been initialized. ## ## If it was already initialized, it runs it immediately. + let f = fun if renderer.initialized: - fun() + f() else: - renderer.queue.add fun + renderer.queue.add f when not defined(release): from sugar import dump