-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build crashes if fullscreen & getSafeArea() is called. #277
Comments
May I know the LOVE version you're using on? |
This was on 11.4, but it seems to effect 11.5 too. |
What are the errors (when running with 11.5)? |
This is a logcat of the crash (github doesn't let me upload it directly). This is tested on a physical device (Samsung Galaxy Z Flip 3), the code I posted earlier seems to work ok on some virtual devices in Android Studio. I think this is because devices in Android Studio do not simulate the safe area unless you use the developer option to Draw Cutout (it draws various notches and is off by default). |
Thanks for the log. I think I found the cause. |
If fullscreen is set to true, either through love.conf(), love.window.setFullscreen() or love.setMode() and then love.window.getSafeArea() is called then the application will crash.
If you run this code, logcat will show multiple errors.
The application will run fine if setFullscreen is called without calling getSafeArea and vice versa. It just means you cannot access the safe area while in fullscreen mode.
However, getSafeArea() can be called before setting fullscreen, but this does not work as the safe area returned has x and y set to 0, 0. If these were accurate numbers this method might be usable.
The text was updated successfully, but these errors were encountered: