[macOS] Re-add define for build with 10.14 SDK, remove unsupported 10.12 checks.
This commit is contained in:
parent
23b7670d32
commit
0c4c530514
|
@ -55,6 +55,10 @@
|
||||||
#include <QuartzCore/CAMetalLayer.h>
|
#include <QuartzCore/CAMetalLayer.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSAppKitVersionNumber10_14
|
||||||
|
#define NSAppKitVersionNumber10_14 1671
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DS_OSX ((DisplayServerOSX *)(DisplayServerOSX::get_singleton()))
|
#define DS_OSX ((DisplayServerOSX *)(DisplayServerOSX::get_singleton()))
|
||||||
|
|
||||||
static void _get_key_modifier_state(unsigned int p_osx_state, Ref<InputEventWithModifiers> r_state) {
|
static void _get_key_modifier_state(unsigned int p_osx_state, Ref<InputEventWithModifiers> r_state) {
|
||||||
|
|
|
@ -60,39 +60,31 @@ public:
|
||||||
|
|
||||||
switch (p_type) {
|
switch (p_type) {
|
||||||
case ERR_WARNING:
|
case ERR_WARNING:
|
||||||
if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_12) {
|
|
||||||
os_log_info(OS_LOG_DEFAULT,
|
os_log_info(OS_LOG_DEFAULT,
|
||||||
"WARNING: %{public}s\nat: %{public}s (%{public}s:%i)",
|
"WARNING: %{public}s\nat: %{public}s (%{public}s:%i)",
|
||||||
err_details, p_function, p_file, p_line);
|
err_details, p_function, p_file, p_line);
|
||||||
}
|
|
||||||
logf_error("\E[1;33mWARNING:\E[0;93m %s\n", err_details);
|
logf_error("\E[1;33mWARNING:\E[0;93m %s\n", err_details);
|
||||||
logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line);
|
logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line);
|
||||||
break;
|
break;
|
||||||
case ERR_SCRIPT:
|
case ERR_SCRIPT:
|
||||||
if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_12) {
|
|
||||||
os_log_error(OS_LOG_DEFAULT,
|
os_log_error(OS_LOG_DEFAULT,
|
||||||
"SCRIPT ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
|
"SCRIPT ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
|
||||||
err_details, p_function, p_file, p_line);
|
err_details, p_function, p_file, p_line);
|
||||||
}
|
|
||||||
logf_error("\E[1;35mSCRIPT ERROR:\E[0;95m %s\n", err_details);
|
logf_error("\E[1;35mSCRIPT ERROR:\E[0;95m %s\n", err_details);
|
||||||
logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line);
|
logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line);
|
||||||
break;
|
break;
|
||||||
case ERR_SHADER:
|
case ERR_SHADER:
|
||||||
if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_12) {
|
|
||||||
os_log_error(OS_LOG_DEFAULT,
|
os_log_error(OS_LOG_DEFAULT,
|
||||||
"SHADER ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
|
"SHADER ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
|
||||||
err_details, p_function, p_file, p_line);
|
err_details, p_function, p_file, p_line);
|
||||||
}
|
|
||||||
logf_error("\E[1;36mSHADER ERROR:\E[0;96m %s\n", err_details);
|
logf_error("\E[1;36mSHADER ERROR:\E[0;96m %s\n", err_details);
|
||||||
logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line);
|
logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line);
|
||||||
break;
|
break;
|
||||||
case ERR_ERROR:
|
case ERR_ERROR:
|
||||||
default:
|
default:
|
||||||
if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_12) {
|
|
||||||
os_log_error(OS_LOG_DEFAULT,
|
os_log_error(OS_LOG_DEFAULT,
|
||||||
"ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
|
"ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
|
||||||
err_details, p_function, p_file, p_line);
|
err_details, p_function, p_file, p_line);
|
||||||
}
|
|
||||||
logf_error("\E[1;31mERROR:\E[0;91m %s\n", err_details);
|
logf_error("\E[1;31mERROR:\E[0;91m %s\n", err_details);
|
||||||
logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line);
|
logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue