summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-04-14 21:09:25 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-04-14 21:13:30 -0400
commitb9eed31f9812f3190c9a14386afeb8ab59643447 (patch)
treec95ab430c0f83db948753a6dd7381e1300485a69
parent7da34ac08a9bb54732857bc7e12b12f873ccfe63 (diff)
asset: Fix on-asset-reload method args.
-rw-r--r--starling/asset.scm8
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))