fixed restoring application with incorrect rect.

This commit is contained in:
rachytski 2012-11-01 19:18:12 +03:00 committed by Alex Zolotarev
parent 8916569f7c
commit 2fe607e8d8
2 changed files with 7 additions and 3 deletions

View file

@ -82,6 +82,7 @@
RenderPolicy::Params rpParams;
CGRect frameRect = [[UIScreen mainScreen] applicationFrame];
CGRect screenRect = [[UIScreen mainScreen] bounds];
rpParams.m_visualScale = [[UIScreen mainScreen] scale];
@ -109,6 +110,9 @@
}
frameBuffer = renderPolicy->GetDrawer()->screen()->frameBuffer();
GetFramework().OnSize(frameRect.size.width * rpParams.m_visualScale,
frameRect.size.height * rpParams.m_visualScale);
GetFramework().SetRenderPolicy(renderPolicy);
}

View file

@ -332,12 +332,12 @@
m_CurrentAction = NOTHING;
[v initRenderPolicy];
// restore previous screen position
if (!f.LoadState())
f.SetMaxWorldRect();
[v initRenderPolicy];
f.Invalidate();
}