mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-25 04:06:18 +00:00
(Apple) Remove configDirectory
This commit is contained in:
parent
ea758485fd
commit
aa04b48579
@ -35,7 +35,6 @@
|
||||
@interface RetroArch_OSX : NSObject<RetroArch_Platform>
|
||||
{
|
||||
NSWindow* _window;
|
||||
NSString* _configDirectory;
|
||||
NSWindowController* _settingsWindow;
|
||||
NSWindow* _coreSelectSheet;
|
||||
NSString* _file;
|
||||
@ -46,7 +45,6 @@
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) NSWindow IBOutlet* window;
|
||||
@property (nonatomic, copy) NSString* configDirectory; // e.g. /var/mobile/Documents/.RetroArch
|
||||
|
||||
+ (RetroArch_OSX*)get;
|
||||
|
||||
|
@ -101,7 +101,6 @@ static char** waiting_argv;
|
||||
@implementation RetroArch_OSX
|
||||
|
||||
@synthesize window = _window;
|
||||
@synthesize configDirectory = _configDirectory;
|
||||
@synthesize settingsWindow = _settingsWindow;
|
||||
@synthesize coreSelectSheet = _coreSelectSheet;
|
||||
@synthesize file = _file;
|
||||
@ -110,7 +109,6 @@ static char** waiting_argv;
|
||||
- (void)dealloc
|
||||
{
|
||||
[_window release];
|
||||
[_configDirectory release];
|
||||
[_coreSelectSheet release];
|
||||
[_settingsWindow release];
|
||||
[_file release];
|
||||
@ -125,17 +123,15 @@ static char** waiting_argv;
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
{
|
||||
NSArray *paths;
|
||||
NSComboBox* cb;
|
||||
const core_info_list_t* core_list;
|
||||
int i;
|
||||
|
||||
NSString *paths = [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) firstObject];
|
||||
apple_platform = self;
|
||||
_loaded = true;
|
||||
|
||||
paths = (NSArray*)NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
|
||||
self.configDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:BOXSTRING("RetroArch")];
|
||||
snprintf(g_defaults.config_path, sizeof(g_defaults.config_path), "%s/retroarch.cfg", self.configDirectory.UTF8String);
|
||||
snprintf(g_defaults.menu_config_dir, sizeof(g_defaults.menu_config_dir), "%s/%s", paths.UTF8String, "RetroArch");
|
||||
snprintf(g_defaults.config_path, sizeof(g_defaults.config_path), "%s/retroarch.cfg", g_defaults.menu_config_dir);
|
||||
snprintf(g_defaults.core_dir, sizeof(g_defaults.core_dir), "%s/%s", NSBundle.mainBundle.bundlePath.UTF8String, "Contents/Resources/modules");
|
||||
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
@ -152,7 +148,7 @@ static char** waiting_argv;
|
||||
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
||||
|
||||
core_info_set_core_path(g_defaults.core_dir);
|
||||
core_info_set_config_path(self.configDirectory.UTF8String);
|
||||
core_info_set_config_path(g_defaults.menu_config_dir);
|
||||
core_list = (const core_info_list_t*)core_info_list_get();
|
||||
|
||||
// Create core select list
|
||||
|
@ -30,8 +30,6 @@
|
||||
@protocol RetroArch_Platform
|
||||
- (void)loadingCore:(NSString*)core withFile:(const char*)file;
|
||||
- (void)unloadingCore:(NSString*)core;
|
||||
|
||||
- (NSString*)configDirectory; // < This returns the directory that contains retroarch.cfg and other custom configs
|
||||
@end
|
||||
|
||||
#ifdef IOS
|
||||
|
@ -46,8 +46,6 @@ const void* apple_get_frontend_settings(void);
|
||||
|
||||
- (void)refreshSystemConfig;
|
||||
|
||||
|
||||
@property (nonatomic) NSString* configDirectory; // e.g. /var/mobile/Documents/.RetroArch
|
||||
@property (nonatomic) NSString* documentsDirectory; // e.g. /var/mobile/Documents
|
||||
|
||||
@end
|
||||
|
@ -200,8 +200,8 @@ static void handle_touch_event(NSArray* touches)
|
||||
self.documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
||||
snprintf(g_defaults.system_dir, sizeof(g_defaults.system_dir), "%s/%s", self.documentsDirectory.UTF8String, ".RetroArch");
|
||||
|
||||
self.configDirectory = BOXSTRING(g_defaults.system_dir);
|
||||
snprintf(g_defaults.config_path, sizeof(g_defaults.config_path), "%s/retroarch.cfg", self.configDirectory.UTF8String);
|
||||
strlcpy(g_defaults.menu_config_dir, g_defaults.system_dir, sizeof(g_defaults.menu_config_dir));
|
||||
snprintf(g_defaults.config_path, sizeof(g_defaults.config_path), "%s/retroarch.cfg", g_defaults.menu_config_dir);
|
||||
snprintf(g_defaults.core_dir, sizeof(g_defaults.core_dir), "%s/%s", NSBundle.mainBundle.bundlePath.UTF8String, "modules");
|
||||
|
||||
path = (const char*)self.documentsDirectory.UTF8String;
|
||||
@ -230,7 +230,7 @@ static void handle_touch_event(NSArray* touches)
|
||||
|
||||
// Warn if there are no cores present
|
||||
core_info_set_core_path(g_defaults.core_dir);
|
||||
core_info_set_config_path(self.configDirectory.UTF8String);
|
||||
core_info_set_config_path(g_defaults.menu_config_dir);
|
||||
core_list = (const core_info_list_t*)core_info_list_get();
|
||||
|
||||
if (!core_list || core_list->count == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user