diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-04-14 21:09:25 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-04-14 21:13:30 -0400 |
commit | b9eed31f9812f3190c9a14386afeb8ab59643447 (patch) | |
tree | c95ab430c0f83db948753a6dd7381e1300485a69 | |
parent | 7da34ac08a9bb54732857bc7e12b12f873ccfe63 (diff) |
asset: Fix on-asset-reload method args.
-rw-r--r-- | starling/asset.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/starling/asset.scm b/starling/asset.scm index 8ddf945..7475280 100644 --- a/starling/asset.scm +++ b/starling/asset.scm @@ -84,7 +84,7 @@ wt)))) (hash-set! sub-table asset asset))) -(define-method (on-asset-reload obj slot-name) +(define-method (on-asset-reload obj slot-name asset) #t) (define-method (add-subscriber (asset <asset>) obj slot-name) @@ -99,7 +99,11 @@ (hashq-set! subs obj slot-names)))) (define-method (notify-subscribers (asset <asset>)) - (hash-for-each on-asset-reload (subscribers asset))) + (hash-for-each (lambda (subscriber slot-names) + (for-each (lambda (slot-name) + (on-asset-reload subscriber slot-name asset)) + slot-names)) + (subscribers asset))) (define-method (asset-purge (asset <asset>)) (hash-remove! (hash-ref (asset-file-map) (file-name asset)) asset)) |