mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-12 05:40:36 +00:00
(Apple) Get rid of coreDirectory
This commit is contained in:
parent
92e67a4382
commit
7580058c22
@ -36,7 +36,6 @@
|
||||
{
|
||||
NSWindow* _window;
|
||||
NSString* _configDirectory;
|
||||
NSString* _coreDirectory;
|
||||
NSWindowController* _settingsWindow;
|
||||
NSWindow* _coreSelectSheet;
|
||||
NSString* _file;
|
||||
@ -48,7 +47,6 @@
|
||||
|
||||
@property (nonatomic, retain) NSWindow IBOutlet* window;
|
||||
@property (nonatomic, copy) NSString* configDirectory; // e.g. /var/mobile/Documents/.RetroArch
|
||||
@property (nonatomic, copy) NSString* coreDirectory; // e.g. /Applications/RetroArch.app/modules
|
||||
|
||||
+ (RetroArch_OSX*)get;
|
||||
|
||||
|
@ -102,7 +102,6 @@ static char** waiting_argv;
|
||||
|
||||
@synthesize window = _window;
|
||||
@synthesize configDirectory = _configDirectory;
|
||||
@synthesize coreDirectory = _coreDirectory;
|
||||
@synthesize settingsWindow = _settingsWindow;
|
||||
@synthesize coreSelectSheet = _coreSelectSheet;
|
||||
@synthesize file = _file;
|
||||
@ -112,7 +111,6 @@ static char** waiting_argv;
|
||||
{
|
||||
[_window release];
|
||||
[_configDirectory release];
|
||||
[_coreDirectory release];
|
||||
[_coreSelectSheet release];
|
||||
[_settingsWindow release];
|
||||
[_file release];
|
||||
@ -138,7 +136,7 @@ static char** waiting_argv;
|
||||
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);
|
||||
self.coreDirectory = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:BOXSTRING("Contents/Resources/modules")];
|
||||
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
|
||||
[self.window setCollectionBehavior:[self.window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
@ -153,7 +151,7 @@ static char** waiting_argv;
|
||||
|
||||
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
||||
|
||||
core_info_set_core_path(self.coreDirectory.UTF8String);
|
||||
core_info_set_core_path(g_defaults.core_dir);
|
||||
core_info_set_config_path(self.configDirectory.UTF8String);
|
||||
core_list = (const core_info_list_t*)core_info_list_get();
|
||||
|
||||
@ -307,7 +305,7 @@ static char** waiting_argv;
|
||||
#pragma mark Menus
|
||||
- (IBAction)showCoresDirectory:(id)sender
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openFile:self.coreDirectory];
|
||||
[[NSWorkspace sharedWorkspace] openFile:BOXSTRING(g_defaults.core_dir)];
|
||||
}
|
||||
|
||||
- (IBAction)showPreferences:(id)sender
|
||||
|
@ -32,7 +32,6 @@
|
||||
- (void)unloadingCore:(NSString*)core;
|
||||
|
||||
- (NSString*)configDirectory; // < This returns the directory that contains retroarch.cfg and other custom configs
|
||||
- (NSString*)coreDirectory; // < This is the default path to where libretro cores are installed
|
||||
@end
|
||||
|
||||
#ifdef IOS
|
||||
|
@ -48,8 +48,6 @@ const void* apple_get_frontend_settings(void);
|
||||
|
||||
|
||||
@property (nonatomic) NSString* configDirectory; // e.g. /var/mobile/Documents/.RetroArch
|
||||
@property (nonatomic) NSString* coreDirectory; // e.g. /Applications/RetroArch.app/modules
|
||||
|
||||
@property (nonatomic) NSString* documentsDirectory; // e.g. /var/mobile/Documents
|
||||
@property (nonatomic) NSString* systemDirectory; // e.g. /var/mobile/Documents/.RetroArch
|
||||
|
||||
|
@ -202,7 +202,7 @@ static void handle_touch_event(NSArray* touches)
|
||||
|
||||
self.configDirectory = self.systemDirectory;
|
||||
snprintf(g_defaults.config_path, sizeof(g_defaults.config_path), "%s/retroarch.cfg", self.configDirectory.UTF8String);
|
||||
self.coreDirectory = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"modules"];
|
||||
snprintf(g_defaults.core_dir, sizeof(g_defaults.core_dir), "%s/%s", NSBundle.mainBundle.bundlePath.UTF8String, "modules");
|
||||
|
||||
path = (const char*)self.documentsDirectory.UTF8String;
|
||||
path_mkdir(path);
|
||||
@ -229,7 +229,7 @@ static void handle_touch_event(NSArray* touches)
|
||||
}
|
||||
|
||||
// Warn if there are no cores present
|
||||
core_info_set_core_path(self.coreDirectory.UTF8String);
|
||||
core_info_set_core_path(g_defaults.core_dir);
|
||||
core_info_set_config_path(self.configDirectory.UTF8String);
|
||||
core_list = (const core_info_list_t*)core_info_list_get();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user