Skip to content
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

Fix Android blank screen #12604

Merged
merged 4 commits into from
Jul 31, 2022
Merged

Conversation

rollerozxa
Copy link
Member

Fixes #12573, caused by 051181f clamping the screen width and height to at least 1, which breaks on Android where those are set to 0.

To do

This PR is a Ready for Review.

How to test

Install the Android version and see so that it actually works again.

@rubenwardy
Copy link
Member

Wack. If this needs to be 0, should this be hard coded rather than using the setting?

@rubenwardy rubenwardy added this to the 5.6.0 milestone Jul 28, 2022
@rollerozxa
Copy link
Member Author

Good idea, I was just about to ask if I should do that.

@sfan5
Copy link
Member

sfan5 commented Jul 28, 2022

It sounds like screen_w and screen_h should be allowed to be zero if fullscreen == true instead of adding android specific code.

@rollerozxa
Copy link
Member Author

I kept the default settings since they are still getted for code related to autosaving screen size that still gets run on Android, might introduce additional issues if that were to be removed.

@rollerozxa
Copy link
Member Author

It sounds like screen_w and screen_h should be allowed to be zero if fullscreen == true instead of adding android specific code.

Setting screen_w and screen_h to zero even when fullscreen is enabled crashes for me on desktop Linux, so I'm pretty sure this would only be a quirk specific to Android.

@sfan5
Copy link
Member

sfan5 commented Jul 28, 2022

Setting screen_w and screen_h to zero even when fullscreen is enabled crashes for me on desktop Linux

works for me
nevermind, but this should probably be made to work inside Irrlicht

@rollerozxa
Copy link
Member Author

rollerozxa commented Jul 28, 2022

That's because the screen size settings are clamped to at least 1 with the current code, forgot to say I tried that with the check removed. 😅

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android main menu doesn't render
5 participants