mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 19:26:43 +01:00
call an exported start function if it exists
This commit is contained in:
@@ -134,6 +134,10 @@ impl super::Runtime for MicroW8 {
|
||||
let end_frame = platform_instance.get_typed_func::<(), ()>(&mut store, "endFrame")?;
|
||||
let update = instance.get_typed_func::<(), ()>(&mut store, "upd").ok();
|
||||
|
||||
if let Some(start) = instance.get_typed_func::<(), ()>(&mut store, "start").ok() {
|
||||
start.call(&mut store, ())?;
|
||||
}
|
||||
|
||||
let (sound_tx, stream) = if self.disable_audio {
|
||||
(None, None)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user