mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
uidriver/glfw: Bug fix: OpenGL was adopted unexpectedly on macOS Big Sur
Fixes #1429
This commit is contained in:
parent
68a5bcd066
commit
1be8c3fc16
@ -22,6 +22,11 @@ package glfw
|
||||
//
|
||||
// #import <Foundation/Foundation.h>
|
||||
//
|
||||
// static int getMacOSMajorVersion() {
|
||||
// NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
// return (int)version.majorVersion;
|
||||
// }
|
||||
//
|
||||
// static int getMacOSMinorVersion() {
|
||||
// NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
// return (int)version.minorVersion;
|
||||
@ -42,9 +47,10 @@ func supportsMetal() bool {
|
||||
if _, err := mtl.CreateSystemDefaultDevice(); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
// On macOS 10.11 El Capitan, there is a rendering issue on Metal (#781).
|
||||
// Use the OpenGL in macOS 10.11 or older.
|
||||
if C.getMacOSMinorVersion() <= 11 {
|
||||
if C.getMacOSMajorVersion() <= 10 && C.getMacOSMinorVersion() <= 11 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user