Skip to content
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

ScreenDensityScaleCalculator: Incorrect scale factor on iPad Mini retina in AIR 30+ #1740

Open
marpies opened this issue Jun 27, 2018 · 5 comments

Comments

@marpies
Copy link
Contributor

marpies commented Jun 27, 2018

AIR 30+ now reports DPI of 326 (previously 264) on iPad Mini retina. Due to this, a scale factor of 3 is calculated by ScreenDensityScaleCalculator.

@joshtynjala
Copy link
Member

I had noticed that AIR reported an incorrect value for Capabilities.screenDPI. It was convenient that this incorrect value worked well with the existing behavior of ScreenDensityScaleFactorManager. It sounds like Adobe finally fixed it.

It may be tricky to differentiate the iPad Mini from other iPads, but I'll see what I can do.

@joshtynjala joshtynjala added this to the 4.0 milestone Jun 27, 2018
@joshtynjala joshtynjala removed this from the 4.0 milestone Nov 15, 2018
@kevinfoley
Copy link
Contributor

@joshtynjala Did you determine that this issue cannot be fixed?

@joshtynjala
Copy link
Member

I do not have plans to create a special case for it.

@kevinfoley
Copy link
Contributor

Ok, thanks for the info. For anyone else who runs into the same issue, it's fairly straightforward to create a hacky special case:

if (screenDensity == 326) {
    if (_starling.nativeStage.fullScreenWidth == 2048 && _starling.nativeStage.fullScreenHeight == 1536 ||
        _starling.nativeStage.fullScreenWidth == 1536 && _starling.nativeStage.fullScreenHeight == 2048)
    {
        screenDensity = 264;
    }
}

@urthling
Copy link

Thank you for highlighting this - I didn't realize this was an issue. So, if just the for the iPad mini:

deviceType aka Capabilities.os

(deviceType.search("iPad4,4") > -1 || deviceType.search("iPad4,5") > -1 || deviceType.search("iPad4,6") > -1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants