mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8373984: Check for macos 11 in CGraphicsDevice.m can be removed
Reviewed-by: prr, kizune
This commit is contained in:
parent
dca55b4366
commit
6c9999ca8d
@ -60,16 +60,14 @@ static int getBPPFromModeString(CFStringRef mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static BOOL isValidDisplayMode(CGDisplayModeRef mode) {
|
static BOOL isValidDisplayMode(CGDisplayModeRef mode) {
|
||||||
// Workaround for apple bug FB13261205, since it only affects arm based macs
|
// Workaround for apple bug FB13261205, only affects arm based macs
|
||||||
// and arm support started with macOS 11 ignore the workaround for previous versions
|
if (architecture == -1) {
|
||||||
if (@available(macOS 11, *)) {
|
architecture = [[NSRunningApplication currentApplication] executableArchitecture];
|
||||||
if (architecture == -1) {
|
|
||||||
architecture = [[NSRunningApplication currentApplication] executableArchitecture];
|
|
||||||
}
|
|
||||||
if (architecture == NSBundleExecutableArchitectureARM64) {
|
|
||||||
return (CGDisplayModeGetPixelWidth(mode) >= 800);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (architecture == NSBundleExecutableArchitectureARM64) {
|
||||||
|
return (CGDisplayModeGetPixelWidth(mode) >= 800);
|
||||||
|
}
|
||||||
|
|
||||||
return (1 < CGDisplayModeGetWidth(mode) && 1 < CGDisplayModeGetHeight(mode));
|
return (1 < CGDisplayModeGetWidth(mode) && 1 < CGDisplayModeGetHeight(mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user