fix(Metal): Use ifdef syntax; add correct default for Metal build

This commit is contained in:
Stuart Carnie 2018-07-15 15:56:47 -07:00
parent 93b79fac90
commit 1264e9c533
2 changed files with 7 additions and 1 deletions

View File

@ -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);

View File

@ -37,7 +37,7 @@
#include "../../retroarch.h"
#include "../../tasks/tasks_internal.h"
#if HAVE_METAL
#ifdef HAVE_METAL
#import <Metal/Metal.h>
#import <MetalKit/MetalKit.h>
#endif