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
Invalid draw on iOS 8 when both Portrait and Landscape mode enabled. #3040
Comments
Just found that I have to keep portrait on as well as landscape left/right. |
Apparently this was fixed as of #2940 |
You can grab a built version of monogame from the build bot too: @ebatiano does this fix it for you too? |
Unfortunately no, it didn't. |
Looks like the rotation happened but the screen resolution didn't update to match |
@picobots - any idea? |
Ooh, that's an interesting one. I've never used both Portrait and Landscape in the same game, but I can do some digging. I'm guessing the width/height values are getting reversed (just like they were in |
Hmm, well, I'm at a loss. I just did a solution-wide search for #if IOS
// Mainscreen.Bounds does not account for the device's orientation. it ALWAYS assumes portrait
var width = (int)(UIScreen.MainScreen.Bounds.Width * UIScreen.MainScreen.Scale);
var height = (int)(UIScreen.MainScreen.Bounds.Height * UIScreen.MainScreen.Scale);
// Flip the dimentions if we need to.
if (TouchPanel.DisplayOrientation == DisplayOrientation.LandscapeLeft || TouchPanel.DisplayOrientation == DisplayOrientation.LandscapeRight)
{
width = height;
height = (int)(UIScreen.MainScreen.Bounds.Width * UIScreen.MainScreen.Scale);
}
backBufferWidth = width;
backBufferHeight = height;
#else if (InterfaceOrientation == UIInterfaceOrientation.LandscapeLeft || InterfaceOrientation == UIInterfaceOrientation.LandscapeRight)
{
var tmpkeyboardSize = keyboardSize;
keyboardSize.Width = Math.Max(tmpkeyboardSize.Height, tmpkeyboardSize.Width);
keyboardSize.Height = Math.Min(tmpkeyboardSize.Height, tmpkeyboardSize.Width);
}
var view = (KeyboardInputView)View;
var contentInsets = new UIEdgeInsets(0f, 0f, keyboardSize.Height, 0f); But I wouldn't think either of those is affecting the screen/display. (Side note though: The first one might be related to this issue?) |
Thanks for your work on this @picobots . We need help on the iOS side of things for sure. |
@danzel , getting the dll from teamcity seemed to do the trick for my issue. Here is a sample project that I made that shows the issue. Has rotation set to landscape left/right in the Info.plist and orientation set to landscape set to left/right in code as well. |
@ytn3rd, the issue is not about landscape mode. It's about apps, where both: landscape and portrait modes are enabled. |
Ohhhhhh.... my bad. |
@ebatiano: I don't have a ton of time to dig much deeper right now, but I'm happy to help out if you can narrow this issue down. Since you have a project that reproduces the issue, maybe you could step through a couple of the MonoGame code locations where |
@tomspilman I'll check this fix on Sunday, unless someone checks it earlier. |
Unfortunately #3098 didn't fix this one. I'll dig more into it. |
#3116 fixed this. |
An app, where both display modes are avaliable (landscape and portrait), when in Portrait mode, app displays like it is still in landscape.
The text was updated successfully, but these errors were encountered: