Skip to content

Commit 6c9999c

Browse files
committed
8373984: Check for macos 11 in CGraphicsDevice.m can be removed
Reviewed-by: prr, kizune
1 parent dca55b4 commit 6c9999c

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,14 @@ static int getBPPFromModeString(CFStringRef mode)
6060
}
6161

6262
static BOOL isValidDisplayMode(CGDisplayModeRef mode) {
63-
// Workaround for apple bug FB13261205, since it only affects arm based macs
64-
// and arm support started with macOS 11 ignore the workaround for previous versions
65-
if (@available(macOS 11, *)) {
66-
if (architecture == -1) {
67-
architecture = [[NSRunningApplication currentApplication] executableArchitecture];
68-
}
69-
if (architecture == NSBundleExecutableArchitectureARM64) {
70-
return (CGDisplayModeGetPixelWidth(mode) >= 800);
71-
}
63+
// Workaround for apple bug FB13261205, only affects arm based macs
64+
if (architecture == -1) {
65+
architecture = [[NSRunningApplication currentApplication] executableArchitecture];
7266
}
67+
if (architecture == NSBundleExecutableArchitectureARM64) {
68+
return (CGDisplayModeGetPixelWidth(mode) >= 800);
69+
}
70+
7371
return (1 < CGDisplayModeGetWidth(mode) && 1 < CGDisplayModeGetHeight(mode));
7472
}
7573

0 commit comments

Comments
 (0)