=> 6857abd51afdb08bc7f9955d9367d155c6bf1a80
[1mdiff --git a/src/macos.h b/src/macos.h[m [1mindex 07990090..700d50f8 100644[m [1m--- a/src/macos.h[m [1m+++ b/src/macos.h[m [36m@@ -26,6 +26,8 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m [m /* Platform-specific functionality for macOS */[m [m [32m+[m[32miBool shouldDefaultToMetalRenderer_MacOS (void);[m [32m+[m void setupApplication_MacOS (void);[m void insertMenuItems_MacOS (const char *menuLabel, int atIndex, const iMenuItem *items, size_t count);[m void handleCommand_MacOS (const char *cmd);[m [1mdiff --git a/src/macos.m b/src/macos.m[m [1mindex 975ba928..1d972ebd 100644[m [1m--- a/src/macos.m[m [1m+++ b/src/macos.m[m [36m@@ -38,14 +38,25 @@[m [menum iTouchBarVariant {[m default_TouchBarVariant,[m };[m [m [32m+[m[32mstatic iInt2 macVer_(void) {[m [32m+[m[32m if ([[NSProcessInfo processInfo] respondsToSelector:@selector(operatingSystemVersion)]) {[m [32m+[m[32m const NSOperatingSystemVersion ver = [[NSProcessInfo processInfo] operatingSystemVersion];[m [32m+[m[32m return init_I2(ver.majorVersion, ver.minorVersion);[m [32m+[m[32m }[m [32m+[m[32m return init_I2(10, 10);[m [32m+[m[32m}[m [32m+[m static NSString *currentSystemAppearance_(void) {[m /* This API does not exist on 10.13. */[m [31m- @try {[m [32m+[m[32m if ([NSApp respondsToSelector:@selector(effectiveAppearance)]) {[m return [[NSApp effectiveAppearance] name];[m }[m [31m- @catch (NSException *) {[m [31m- return @"NSAppearanceNameAqua";[m [31m- }[m [32m+[m[32m return @"NSAppearanceNameAqua";[m [32m+[m[32m}[m [32m+[m [32m+[m[32miBool shouldDefaultToMetalRenderer_MacOS(void) {[m [32m+[m[32m const iInt2 ver = macVer_();[m [32m+[m[32m return ver.x > 10 || ver.y > 13;[m }[m [m /*----------------------------------------------------------------------------------------------*/[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex b1fd3a07..97d56ec5 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -522,7 +522,7 @@[m [mvoid init_Window(iWindow *d, iRect rect) {[m d->isDrawFrozen = iTrue;[m uint32_t flags = 0;[m #if defined (iPlatformApple)[m [31m- SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal");[m [32m+[m[32m SDL_SetHint(SDL_HINT_RENDER_DRIVER, shouldDefaultToMetalRenderer_MacOS() ? "metal" : "opengl");[m #else[m flags |= SDL_WINDOW_OPENGL;[m #endif[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).