OS/Browser can't be detected from Lua/Love2D #5
Labels
bug
Something isn't working
enhancement
New feature or request specific to web platform
minor
Small impact on overall usability and none on game functionality
upstream issue
An issue with Love.js or a browser, that I'm unable to work around
For a few things, the game needs to behaviour differently depending on the platform. For example, the pause_on_loose focus setting being off doesn't work on mobile very well because Android and iOS are very aggressive in suspending background processes (using the correct platform/web APIs it'd probably be possible to work around this.. but not very feasible to do from the Love2D/Lua environment), so ideally I'd like to remove the toggle so it's always on (like I do on the Android native app). Another example is how scrolling doesn't work consistently across platforms - it's way faster on Linux and ChromeOS. I would like to slow this down, but I can't when OS is always returned as "Web" by Love2D.
There is a bridge you can use to communicate between Love2D and Javascript, however it requires console wrapping to work, which is disabled on Github pages unfortunately.
The text was updated successfully, but these errors were encountered: