You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. A feature request. Add the ability to create a lovejs bundle which would contain both the pthread version and the compatibility version, and at the beginning of the execution, it'd detect if your browser supports pthreads in order to pick the best version.
The text was updated successfully, but these errors were encountered:
I've looked into this a bit. Looks like there is no direct check for pthreads support. The way to implement this would probably be to catch all exceptions from the main loop and switch versions if they are encountered.
I've looked around. I don't know if it's relevant here, but I've found this: whatwg/html#4732
Some people suggest ways to detect SharedArrayBuffer support, but I'm not even sure that it's the same as pthread support.
If that is not useful, here's another idea: maybe it'd be simpler to just call some dummy pthread init code on startup to know right away if it's supported or not by the browser, so you don't have to bother trying to catch exceptions that might arise later while playing the game.
window.SharedArrayBuffer === undefined does seem to coincide with browsers where the compat version is required in my limited testing. Seems like a good enough heuristic. I'd want to fall back to compat aggressively to ensure things run.
Hi. A feature request. Add the ability to create a lovejs bundle which would contain both the pthread version and the compatibility version, and at the beginning of the execution, it'd detect if your browser supports pthreads in order to pick the best version.
The text was updated successfully, but these errors were encountered: