Use OpenGL by default on Intel macs

Apparently ANGLE can fail to compile shaders on Intel macs if Metal is chosen.
This commit is contained in:
Snowdream 2022-07-18 21:27:26 -04:00
parent 79bae839de
commit 0135bda50a
2 changed files with 9 additions and 3 deletions

View file

@ -15,8 +15,9 @@
// - Enables/disables the extra console window on Windows. It appears by
// default whenever mkxp-z is started in debug mode.
// "MKXPZ_MACOS_METAL"
// - Setting this to 0 will force the usage of OpenGL over Metal.
// Probably not a good idea unless you have some kind of issue.
// - Setting this will influence the rendering backend used.
// Probably not a good idea to mess with it unless you have some kind of issue.
// OpenGL is default on x86, and Metal is the default on Apple Silicon.
// "MKXPZ_FOLDER_SELECT"
// - Allows the manual selection of the game's folder at startup.
// Only works on macOS at the moment.

View file

@ -297,7 +297,12 @@ try { exp } catch (...) {}
#ifdef __APPLE__
// Determine whether to use the Metal renderer on macOS
preferMetalRenderer = isMetalSupported() && getEnvironmentBool("MKXPZ_MACOS_METAL", true);
#if defined(__x86_64__)
#define METAL_DEFAULT_SETTING false
#else
#define METAL_DEFAULT_SETTING true
#endif
preferMetalRenderer = isMetalSupported() && getEnvironmentBool("MKXPZ_MACOS_METAL", METAL_DEFAULT_SETTING);
#endif
// Determine whether to allow manual selection of a game folder on startup