From bbedc4e1f16f4d76b30eeaf9ebdf55f6b05af0bb Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 4 Sep 2021 08:13:18 +1000 Subject: [PATCH] Fix can't click dialogs on macOS 10.3 --- src/Platform_Posix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Platform_Posix.c b/src/Platform_Posix.c index 4c912c653..fee46c405 100644 --- a/src/Platform_Posix.c +++ b/src/Platform_Posix.c @@ -993,6 +993,11 @@ static void Platform_InitStopwatch(void) { #if defined CC_BUILD_MACOS static void Platform_InitSpecific(void) { ProcessSerialNumber psn = { 0, kCurrentProcess }; +#ifdef __ppc__ + /* TransformProcessType doesn't work with kCurrentProcess on older macOS */ + GetCurrentProcess(&psn); +#endif + /* NOTE: Call as soon as possible, otherwise can't click on dialog boxes or create windows */ /* NOTE: TransformProcessType is macOS 10.3 or later */ TransformProcessType(&psn, kProcessTransformToForegroundApplication);