|
@@ -520,26 +520,25 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|
|
{
|
|
|
const NSRect contentRect = [window->ns.view frame];
|
|
|
const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];
|
|
|
-
|
|
|
- if (fbRect.size.width != window->ns.fbWidth ||
|
|
|
- fbRect.size.height != window->ns.fbHeight)
|
|
|
- {
|
|
|
- window->ns.fbWidth = fbRect.size.width;
|
|
|
- window->ns.fbHeight = fbRect.size.height;
|
|
|
- _glfwInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);
|
|
|
- }
|
|
|
-
|
|
|
const float xscale = fbRect.size.width / contentRect.size.width;
|
|
|
const float yscale = fbRect.size.height / contentRect.size.height;
|
|
|
|
|
|
if (xscale != window->ns.xscale || yscale != window->ns.yscale)
|
|
|
{
|
|
|
+ if (window->ns.retina && window->ns.layer)
|
|
|
+ [window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];
|
|
|
+
|
|
|
window->ns.xscale = xscale;
|
|
|
window->ns.yscale = yscale;
|
|
|
_glfwInputWindowContentScale(window, xscale, yscale);
|
|
|
+ }
|
|
|
|
|
|
- if (window->ns.retina && window->ns.layer)
|
|
|
- [window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];
|
|
|
+ if (fbRect.size.width != window->ns.fbWidth ||
|
|
|
+ fbRect.size.height != window->ns.fbHeight)
|
|
|
+ {
|
|
|
+ window->ns.fbWidth = fbRect.size.width;
|
|
|
+ window->ns.fbHeight = fbRect.size.height;
|
|
|
+ _glfwInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);
|
|
|
}
|
|
|
}
|
|
|
|