diff options
-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)) |