Skip to content

Comments

Fix some issues when launching threaded cores#76

Merged
arianrhodsandlot merged 3 commits intoarianrhodsandlot:mainfrom
white-axe:thread
Feb 1, 2026
Merged

Fix some issues when launching threaded cores#76
arianrhodsandlot merged 3 commits intoarianrhodsandlot:mainfrom
white-axe:thread

Conversation

@white-axe
Copy link
Contributor

Support for threaded cores was added in #75, but I think it can be improved.

  • If the JavaScript file and WebAssembly file for the core are resolvable as blobs, we can automate the process of loading the core without having the user manually set the hooks as specified in Support for multi threading cores #75. I have modified setupEmscripten() to do this. Please note the core needs to have been built with at least RetroArch 1.21.0 and Emscripten 4.0.8 (I believe the extra .worker.js file that comes with threaded cores disappeared around RetroArch 1.21.0).
  • If RetroArch is built with -DHAVE_WASMFS=1 and/or -DHAVE_EXTRA_WASMFS=1, the latter of which is currently required by the threaded version of the RetroArch web player, there will not be a Module.FS.init() function, so the code shouldn't assume it exists.
  • mainScriptUrlOrBlob can also be a blob.

@arianrhodsandlot arianrhodsandlot merged commit 1406dcb into arianrhodsandlot:main Feb 1, 2026
3 checks passed
@arianrhodsandlot
Copy link
Owner

Thanks!

@white-axe white-axe deleted the thread branch February 1, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants