Giter Club home page Giter Club logo

Comments (6)

slime73 avatar slime73 commented on September 13, 2024

Looking at the code, it seems like it will do what you want if the window is resizable, right? Here:

/* At least one orientation is allowed */
if (resizable) {
if (is_portrait_allowed && is_landscape_allowed) {
/* hint allows both landscape and portrait, promote to full user */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;

from sdl.

AntTheAlchemist avatar AntTheAlchemist commented on September 13, 2024

Looking at the code, it seems like it will do what you want if the window is resizable, right?

You're right - I didn't notice I was missing that flag in my window creation 🤦🏼‍♂️ Thanks!

from sdl.

AntTheAlchemist avatar AntTheAlchemist commented on September 13, 2024

I did find another bug though. If choosing between a flipped, or not, version of landscape / portrait, the user setting isn't respected, so it will always use the sensor, regardless of user's auto rotate setting. So, if it's a full 360 rotation, that works fine, and respects the user's auto rotate. But landscapeLeft & landscapeRight will always be sensor, ignoring user's auto rotate. Does that make sense?

from sdl.

slouken avatar slouken commented on September 13, 2024

Patches welcome!

from sdl.

AntTheAlchemist avatar AntTheAlchemist commented on September 13, 2024

I'll have a bash at a fix later - it's making me go cross-eyed at the moment.

from sdl.

AntTheAlchemist avatar AntTheAlchemist commented on September 13, 2024

07636ac fixes the user's auto-rotate issue, but I found yet another problem in the logic:

SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight Portrait"); will allow PortraitUpsideDown, because there's no distinction between one portrait and both landscape (and visa versa... one landscape and both portraits) when deciding to allow all orientations (hope that makes sense). I don't see a way to actually fix this without looking to see if we're attempting to get landscape or portrait. setOrientationBis() is flawed; a different approach is needed.

from sdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.