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

Android: add reverse landscape to screen orientation settings #9139

Merged
merged 1 commit into from Oct 9, 2020
Merged

Android: add reverse landscape to screen orientation settings #9139

merged 1 commit into from Oct 9, 2020

Conversation

lynxnb
Copy link
Member

@lynxnb lynxnb commented Oct 7, 2020

Until now, when screen orientation is set to Landscape, the emulation activity will be fixed on a 90 degrees rotated position.
This pull request aims at allowing 90 and 270 degrees landscape rotations, based on sensor data (independently of user android settings).

Controllers like the Gamesir X2, which have a USB Type-C port on the left will force the phone to a 270 degrees rotated state, so this is useful for those users (like me).

@JosJuice
Copy link
Member

JosJuice commented Oct 7, 2020

I specifically made it default to a mode that does not take the sensor data into account in order to avoid accidentally triggering orientation changes when using motion controls. I would not mind adding SCREEN_ORIENTATION_SENSOR_LANDSCAPE as an additional option, but I feel strongly about keeping SCREEN_ORIENTATION_LANDSCAPE as an option. I'm less certain about which one of the two fits best as the default.

@lynxnb
Copy link
Member Author

lynxnb commented Oct 7, 2020

Uhm yeah I definitely missed that. Another thing we can do is add SCREEN_ORIENTATION_REVERSE_LANDSCAPE as an option and keep LANDSCAPE as default, so in both cases they don't interfere with motion controls.

@JosJuice
Copy link
Member

JosJuice commented Oct 7, 2020

That sounds good to me.

@lynxnb
Copy link
Member Author

lynxnb commented Oct 7, 2020

Ok what I haven't considered now is if motion controls are expecting a reverse landscape setting. I will have to test that.

@JosJuice
Copy link
Member

JosJuice commented Oct 7, 2020

Motion controls should be working correctly regardless of orientation, but feel free to check to make sure.

@lynxnb
Copy link
Member Author

lynxnb commented Oct 7, 2020

Tested all combinations, working as expected.

Copy link
Member

@JosJuice JosJuice left a comment

Choose a reason for hiding this comment

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

LGTM if you squash the commits into one and update the pull request title.

@lynxnb lynxnb changed the title Android: Enable sensor-based landscape rotation Android: add reverse landscape to screen orientation settings Oct 7, 2020
@lynxnb
Copy link
Member Author

lynxnb commented Oct 8, 2020

Should be good to go.

@JosJuice JosJuice merged commit 696f08e into dolphin-emu:master Oct 9, 2020
10 checks passed
@lynxnb lynxnb deleted the fix-landscape-rotation-android branch October 13, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants