From 6705ef9737ca742bd0e713e9c06eaef4744b32e1 Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Sun, 7 Nov 2021 19:18:22 +0100 Subject: [PATCH] [orx-olive] Fix problem with requestAssets and produceAssets events --- orx-jvm/orx-olive/src/main/kotlin/Olive.kt | 5 ++++- orx-jvm/orx-olive/src/main/kotlin/OliveProgram.kt | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/orx-jvm/orx-olive/src/main/kotlin/Olive.kt b/orx-jvm/orx-olive/src/main/kotlin/Olive.kt index d955aa67..cce1576f 100644 --- a/orx-jvm/orx-olive/src/main/kotlin/Olive.kt +++ b/orx-jvm/orx-olive/src/main/kotlin/Olive.kt @@ -87,7 +87,10 @@ class Olive

(val resources: Resources? = null, private var scriptMod program.window.minimized, program.window.moved, program.window.sized, - program.window.unfocused) + program.window.unfocused, + program.requestAssets, + program.produceAssets + ) trackedListeners.forEach { it.saveListeners(store) } diff --git a/orx-jvm/orx-olive/src/main/kotlin/OliveProgram.kt b/orx-jvm/orx-olive/src/main/kotlin/OliveProgram.kt index 2146d2a4..2582a25a 100644 --- a/orx-jvm/orx-olive/src/main/kotlin/OliveProgram.kt +++ b/orx-jvm/orx-olive/src/main/kotlin/OliveProgram.kt @@ -8,8 +8,6 @@ import java.nio.file.Paths import kotlin.reflect.KProperty import kotlin.streams.toList - - open class OliveProgram(private val sourceLocation: String, private val scriptHost: OliveScriptHost, resources: Resources?) : Program() { val olive = extend(Olive(scriptMode = ScriptMode.OLIVE_PROGRAM, resources = resources)) { script = sourceLocation @@ -28,7 +26,6 @@ class Once(val build:() -> T) { operator fun getValue(thisRef:Any?, property:KProperty<*>) : T = values.getOrPut(property.name) { build() } as T } - fun stackRootClassName(thread: Thread = Thread.currentThread(), sanitize: Boolean = true): String { val root = Thread.currentThread().stackTrace.last() val rootClass = root.className