Hello,
I installed MonoGame 3.6.
The orientation do not change automatically when I change the orientation of my smartphone.
So, I wrote some code in OnOrientationChanged().
In MonoGame 3.5, orientation changed automatically and OnClientSizeChanged was called without writing this code.
Is the specification change? or is my setting something wrong?
My added code is…
void OnOrientationChanged(object sender, EventArgs e)
{
Microsoft.Xna.Framework.AndroidGameWindow g = (Microsoft.Xna.Framework.AndroidGameWindow)sender;
if(g.CurrentOrientation == DisplayOrientation.LandscapeLeft)
{
Game1.Activity.RequestedOrientation = Android.Content.PM.ScreenOrientation.Landscape;
}else if(g.CurrentOrientation == DisplayOrientation.LandscapeRight)
{
Game1.Activity.RequestedOrientation = Android.Content.PM.ScreenOrientation.ReverseLandscape;
}else
{
Game1.Activity.RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;
}
}