Skip to content

Commit

Permalink
[orx-olive] Fix problem with requestAssets and produceAssets events
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinRNDR committed Nov 7, 2021
1 parent ad2b5da commit 6705ef9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion orx-jvm/orx-olive/src/main/kotlin/Olive.kt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ class Olive<P : Program>(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) }

Expand Down
3 changes: 0 additions & 3 deletions orx-jvm/orx-olive/src/main/kotlin/OliveProgram.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<OliveProgram>(scriptMode = ScriptMode.OLIVE_PROGRAM, resources = resources)) {
script = sourceLocation
Expand All @@ -28,7 +26,6 @@ class Once<T:Any>(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
Expand Down

0 comments on commit 6705ef9

Please sign in to comment.