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

Device orientation problem #281

Open
dudejj opened this issue Apr 19, 2024 · 0 comments
Open

Device orientation problem #281

dudejj opened this issue Apr 19, 2024 · 0 comments

Comments

@dudejj
Copy link

dudejj commented Apr 19, 2024

If I compile for example 2048.v to android, run it and change the orientation of the device, app's scaling goes too small, too big or whatever in between.

I guess the reason is that in orientation change both the code and the device is resizing and it don't end well.

If I remove orientation activity from AndroidManifest.xml (a hint from some android chat), scale stays but at least this 2048 restarts in orientation change. Not a good feature for a game.

In my own graphical app testing, the issue is same. If I try to get screen size with gg.screen_size() to handle window size/scaling by code to screen limits, it returns zeroes and can not be done.
Context.window_size() (and gg.window_size() ) gives different values after orientation changes (even when back to same orientation).
Is there a way to handle this by vab or is it purely gg and coding issue.

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

No branches or pull requests

1 participant