From 1264e9c533fdb5c80aff9e7355dfb03eb741f8eb Mon Sep 17 00:00:00 2001 From: Stuart Carnie Date: Sun, 15 Jul 2018 15:56:47 -0700 Subject: [PATCH] fix(Metal): Use ifdef syntax; add correct default for Metal build --- frontend/drivers/platform_darwin.m | 6 ++++++ ui/drivers/ui_cocoa.m | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/drivers/platform_darwin.m b/frontend/drivers/platform_darwin.m index e63bd59056..2e367ec0f7 100644 --- a/frontend/drivers/platform_darwin.m +++ b/frontend/drivers/platform_darwin.m @@ -347,9 +347,15 @@ static void frontend_darwin_get_environment_settings(int *argc, char *argv[], #endif strlcat(home_dir_buf, "/RetroArch", sizeof(home_dir_buf)); +#ifdef HAVE_METAL + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], + home_dir_buf, "shaders_slang", + sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER])); +#else fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], home_dir_buf, "shaders_glsl", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER])); +#endif #if TARGET_OS_IPHONE int major, minor; get_ios_version(&major, &minor); diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index 05259411e0..bf66477fe6 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -37,7 +37,7 @@ #include "../../retroarch.h" #include "../../tasks/tasks_internal.h" -#if HAVE_METAL +#ifdef HAVE_METAL #import #import #endif