mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-03 08:38:18 +00:00
(Apple) Nits
This commit is contained in:
parent
aa078cdae8
commit
073ded005c
@ -127,12 +127,16 @@ static char** waiting_argv;
|
|||||||
NSComboBox* cb;
|
NSComboBox* cb;
|
||||||
const core_info_list_t* core_list;
|
const core_info_list_t* core_list;
|
||||||
int i;
|
int i;
|
||||||
const char *paths = [[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) firstObject] UTF8String];
|
const char *paths;
|
||||||
|
|
||||||
apple_platform = self;
|
apple_platform = self;
|
||||||
|
|
||||||
|
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.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));
|
fill_pathname_join(g_defaults.config_path, g_defaults.menu_config_dir, "retroarch.cfg", sizeof(g_defaults.config_path));
|
||||||
fill_pathname_join(g_defaults.core_dir, NSBundle.mainBundle.bundlePath.UTF8String, "Contents/Resources/modules", sizeof(g_defaults.core_dir));
|
|
||||||
|
|
||||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||||
[self.window setCollectionBehavior:[self.window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary];
|
[self.window setCollectionBehavior:[self.window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary];
|
||||||
@ -147,6 +151,7 @@ static char** waiting_argv;
|
|||||||
|
|
||||||
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
||||||
|
|
||||||
|
// Warn if there are no cores present
|
||||||
core_info_set_core_path();
|
core_info_set_core_path();
|
||||||
core_list = (const core_info_list_t*)core_info_list_get();
|
core_list = (const core_info_list_t*)core_info_list_get();
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ static void handle_touch_event(NSArray* touches)
|
|||||||
{
|
{
|
||||||
const rarch_setting_t* frontend_settings;
|
const rarch_setting_t* frontend_settings;
|
||||||
const core_info_list_t* core_list;
|
const core_info_list_t* core_list;
|
||||||
const char *path;
|
const char *paths;
|
||||||
|
|
||||||
apple_platform = self;
|
apple_platform = self;
|
||||||
[self setDelegate:self];
|
[self setDelegate:self];
|
||||||
@ -192,18 +192,18 @@ static void handle_touch_event(NSArray* touches)
|
|||||||
// Build system paths and test permissions
|
// Build system paths and test permissions
|
||||||
self.documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
self.documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
||||||
fill_pathname_join(g_defaults.system_dir, self.documentsDirectory.UTF8String, ".RetroArch", sizeof(g_defaults.system_dir));
|
fill_pathname_join(g_defaults.system_dir, self.documentsDirectory.UTF8String, ".RetroArch", sizeof(g_defaults.system_dir));
|
||||||
|
fill_pathname_join(g_defaults.core_dir, NSBundle.mainBundle.bundlePath.UTF8String, "modules", sizeof(g_defaults.core_dir));
|
||||||
|
|
||||||
strlcpy(g_defaults.menu_config_dir, g_defaults.system_dir, sizeof(g_defaults.menu_config_dir));
|
strlcpy(g_defaults.menu_config_dir, g_defaults.system_dir, 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));
|
fill_pathname_join(g_defaults.config_path, g_defaults.menu_config_dir, "retroarch.cfg", sizeof(g_defaults.config_path));
|
||||||
fill_pathname_join(g_defaults.core_dir, NSBundle.mainBundle.bundlePath.UTF8String, "modules", sizeof(g_defaults.core_dir));
|
|
||||||
|
|
||||||
strlcpy(g_defaults.sram_dir, g_defaults.system_dir, sizeof(g_defaults.sram_dir));
|
strlcpy(g_defaults.sram_dir, g_defaults.system_dir, sizeof(g_defaults.sram_dir));
|
||||||
strlcpy(g_defaults.savestate_dir, g_defaults.system_dir, sizeof(g_defaults.savestate_dir));
|
strlcpy(g_defaults.savestate_dir, g_defaults.system_dir, sizeof(g_defaults.savestate_dir));
|
||||||
|
|
||||||
path = (const char*)self.documentsDirectory.UTF8String;
|
paths = (const char*)self.documentsDirectory.UTF8String;
|
||||||
path_mkdir(path);
|
path_mkdir(paths);
|
||||||
|
|
||||||
if (access(path, 0755) != 0)
|
if (access(paths, 0755) != 0)
|
||||||
{
|
{
|
||||||
char msg[256];
|
char msg[256];
|
||||||
snprintf(msg, sizeof(msg), "Failed to create or access base directory: %s", self.documentsDirectory.UTF8String);
|
snprintf(msg, sizeof(msg), "Failed to create or access base directory: %s", self.documentsDirectory.UTF8String);
|
||||||
@ -211,10 +211,10 @@ static void handle_touch_event(NSArray* touches)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
path = g_defaults.system_dir;
|
paths = g_defaults.system_dir;
|
||||||
path_mkdir(path);
|
path_mkdir(paths);
|
||||||
|
|
||||||
if (access(path, 0755) != 0)
|
if (access(paths, 0755) != 0)
|
||||||
{
|
{
|
||||||
char msg[256];
|
char msg[256];
|
||||||
snprintf(msg, sizeof(msg), "Failed to create or access system directory: %s", g_defaults.system_dir);
|
snprintf(msg, sizeof(msg), "Failed to create or access system directory: %s", g_defaults.system_dir);
|
||||||
|
Loading…
Reference in New Issue
Block a user