call an exported start function if it exists

This commit is contained in:
dranke authored and denni committed 2024-06-09 00:35:25 +02:00
1 parent 4a4beded11
commit 8a473cc9b9
4 files changed
+14 -1

No files matched your search

+4
View File
@@ -263,6 +263,10 @@ export default function MicroW8(screen, config = {}) {
window.addEventListener('blur', () => updateVisibility(false), { signal: abortController.signal });
updateVisibility(document.hasFocus());
if (instance.exports.start) {
instance.exports.start();
}
function mainloop() {
if (!keepRunning) {
return;