mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-11 16:45:48 -04:00
Mac: Less warnings when compiling with modern xcode
This commit is contained in:
parent
3ad1f1f169
commit
19cdffd5f2
@ -113,8 +113,8 @@ static cc_bool CreateLogsDirectory(void) {
|
|||||||
cc_result res;
|
cc_result res;
|
||||||
/* Utils_EnsureDirectory cannot be used here because it causes a stack overflow */
|
/* Utils_EnsureDirectory cannot be used here because it causes a stack overflow */
|
||||||
/* when running the game and an error occurs when trying to create the directory */
|
/* when running the game and an error occurs when trying to create the directory */
|
||||||
/* This happens because when running the game, Logger_WarnFunc is changed to log
|
/* This happens because when running the game, Logger_WarnFunc is changed to log */
|
||||||
/* a message in chat instead of showing a dialog box, which causes the following
|
/* a message in chat instead of showing a dialog box, which causes the following */
|
||||||
/* functions to be called in a recursive loop: */
|
/* functions to be called in a recursive loop: */
|
||||||
/* */
|
/* */
|
||||||
/* Utils_EnsureDirectory --> Logger_SysWarn2 --> Chat_Add --> AppendChatLog -> OpenChatLog */
|
/* Utils_EnsureDirectory --> Logger_SysWarn2 --> Chat_Add --> AppendChatLog -> OpenChatLog */
|
||||||
|
@ -1691,9 +1691,8 @@ static void Platform_InitStopwatch(void) {
|
|||||||
|
|
||||||
#if defined CC_BUILD_MACOS
|
#if defined CC_BUILD_MACOS
|
||||||
static void Platform_InitSpecific(void) {
|
static void Platform_InitSpecific(void) {
|
||||||
ProcessSerialNumber psn; /* TODO: kCurrentProcess */
|
ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||||
/* NOTE: Call as soon as possible, otherwise can't click on dialog boxes. */
|
/* NOTE: Call as soon as possible, otherwise can't click on dialog boxes or create windows */
|
||||||
GetCurrentProcess(&psn);
|
|
||||||
/* NOTE: TransformProcessType is macOS 10.3 or later */
|
/* NOTE: TransformProcessType is macOS 10.3 or later */
|
||||||
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
|
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user