mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
(OSX) add stubbed out replacement C code using CoreFoundation for grabbing
application support dir path - figure out why it's broken
This commit is contained in:
parent
6d4badd220
commit
1a52ce43ec
@ -132,11 +132,25 @@ static char** waiting_argv;
|
||||
{
|
||||
apple_platform = self;
|
||||
|
||||
#if 1
|
||||
const char* paths = [[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) firstObject] UTF8String];
|
||||
fill_pathname_join(g_defaults.core_dir, NSBundle.mainBundle.bundlePath.UTF8String, "Contents/Resources/modules", sizeof(g_defaults.core_dir));
|
||||
|
||||
fill_pathname_join(g_defaults.menu_config_dir, paths, "RetroArch", sizeof(g_defaults.menu_config_dir));
|
||||
fill_pathname_join(g_defaults.config_path, g_defaults.menu_config_dir, "retroarch.cfg", sizeof(g_defaults.config_path));
|
||||
#else
|
||||
char support_path_buf[PATH_MAX + 1];
|
||||
CFArrayRef array = (CFArrayRef)NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
|
||||
CFStringRef support_path = (CFStringRef)CFArrayGetValueAtIndex(array, 0);
|
||||
CFStringGetCString(support_path, support_path_buf, sizeof(support_path_buf), kCFStringEncodingUTF8);
|
||||
|
||||
fill_pathname_join(g_defaults.core_dir, NSBundle.mainBundle.bundlePath.UTF8String, "Contents/Resources/modules", sizeof(g_defaults.core_dir));
|
||||
fill_pathname_join(g_defaults.menu_config_dir, support_path_buf, "RetroArch", sizeof(g_defaults.menu_config_dir));
|
||||
fill_pathname_join(g_defaults.config_path, g_defaults.menu_config_dir, "retroarch.cfg", sizeof(g_defaults.config_path));
|
||||
|
||||
CFRelease(support_path);
|
||||
CFRelease(array);
|
||||
#endif
|
||||
|
||||
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
|
Loading…
x
Reference in New Issue
Block a user