From 22e3e19780e0ea26da755d66e201e393e57f95c4 Mon Sep 17 00:00:00 2001 From: Isaac Aronson Date: Thu, 15 Feb 2024 18:09:05 -0600 Subject: [PATCH] Don't set QT_MAC_WANTS_LAYER on modern macOS --- FlashGBX/FlashGBX.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FlashGBX/FlashGBX.py b/FlashGBX/FlashGBX.py index 47e3c62..92478f5 100644 --- a/FlashGBX/FlashGBX.py +++ b/FlashGBX/FlashGBX.py @@ -78,7 +78,11 @@ def LoadConfig(args): class ArgParseCustomFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter): pass def main(portableMode=False): if platform.system() == "Windows": os.system("color") - os.environ['QT_MAC_WANTS_LAYER'] = '1' + if platform.system() == "Darwin": + macos_version = tuple(map(int, platform.mac_ver()[0].split('.'))) + # macOS above Big Sur don't need a compat layer fix in the environment + if macos_version < (12, 0): + os.environ['QT_MAC_WANTS_LAYER'] = '1' print("{:s} {:s} by Lesserkuma".format(Util.APPNAME, Util.VERSION)) print("https://github.com/lesserkuma/FlashGBX")