feathersui-starling icon indicating copy to clipboard operation
feathersui-starling copied to clipboard

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

Open marpies opened this issue 7 years ago • 5 comments
trafficstars

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.

marpies avatar Jun 27 '18 08:06 marpies

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 avatar Jun 27 '18 15:06 joshtynjala

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

kevinfoley avatar Jan 13 '20 21:01 kevinfoley

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

joshtynjala avatar Jan 13 '20 22:01 joshtynjala

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;
    }
}

kevinfoley avatar Jan 13 '20 23:01 kevinfoley

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)

urthling avatar Jan 14 '20 03:01 urthling