I am developing a game in which I need to rotate the screen on Landscape mode or Portrait, and lock it that way.
In Monogame, targeting Windows Phone 8.1 adding this code:
Graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;
Graphics.ApplyChanges();
Was enough, but in Monogame, targeting Windows Phone 8 I can switch from Portrait mode to Landscape, even if I put the code above in the game constructor.
How can I stop/freeze the user from chaning the orientations on a specific category in my game?
Thanks.
activity
? In android I useScreenOrientation = ScreenOrientation.SensorLandscape;
and it does what you describe. The user can rotate left/right keeping landscape mode at all times. I have no experience with windows phone unfortunately. \$\endgroup\$