mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
(Apple) Cleanups
This commit is contained in:
parent
670ce086c6
commit
86fa191ae7
@ -49,7 +49,7 @@
|
||||
+ (RetroArch_OSX*)get;
|
||||
|
||||
- (void)loadingCore:(NSString*)core withFile:(const char*)file;
|
||||
- (void)unloadingCore:(NSString*)core;
|
||||
- (void)unloadingCore;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -282,7 +282,7 @@ static char** waiting_argv;
|
||||
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:BOXSTRING(file)]];
|
||||
}
|
||||
|
||||
- (void)unloadingCore:(const NSString*)core
|
||||
- (void)unloadingCore
|
||||
{
|
||||
if (g_extern.system.shutdown)
|
||||
[[NSApplication sharedApplication] terminate:nil];
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
@protocol RetroArch_Platform
|
||||
- (void)loadingCore:(NSString*)core withFile:(const char*)file;
|
||||
- (void)unloadingCore:(NSString*)core;
|
||||
- (void)unloadingCore;
|
||||
@end
|
||||
|
||||
#ifdef IOS
|
||||
@ -40,7 +40,7 @@
|
||||
#endif
|
||||
|
||||
extern char** apple_argv;
|
||||
extern NSString* apple_core;
|
||||
extern char apple_core[PATH_MAX];
|
||||
|
||||
extern id<RetroArch_Platform> apple_platform;
|
||||
|
||||
|
@ -23,17 +23,11 @@
|
||||
id<RetroArch_Platform> apple_platform;
|
||||
|
||||
#pragma mark EMULATION
|
||||
NSString* apple_core;
|
||||
char apple_core[PATH_MAX];
|
||||
|
||||
void apple_rarch_exited(void)
|
||||
{
|
||||
NSString *used_core = (NSString*)apple_core;
|
||||
apple_core = 0;
|
||||
[apple_platform unloadingCore:used_core];
|
||||
|
||||
#ifdef OSX
|
||||
[used_core release];
|
||||
#endif
|
||||
[apple_platform unloadingCore];
|
||||
}
|
||||
|
||||
void apple_run_core(NSString* core, const char* file)
|
||||
@ -44,16 +38,17 @@ void apple_run_core(NSString* core, const char* file)
|
||||
|
||||
[apple_platform loadingCore:core withFile:file];
|
||||
|
||||
apple_core = core;
|
||||
if (core.UTF8String && core.UTF8String[0] != '\0')
|
||||
strlcpy(apple_core, core.UTF8String, sizeof(apple_core));
|
||||
|
||||
if (file && core)
|
||||
{
|
||||
strlcpy(core_path, apple_core.UTF8String, sizeof(core_path));
|
||||
strlcpy(core_path, apple_core, sizeof(core_path));
|
||||
strlcpy(file_path, file, sizeof(file_path));
|
||||
}
|
||||
|
||||
if (core_info_has_custom_config(apple_core.UTF8String))
|
||||
core_info_get_custom_config(apple_core.UTF8String, config_path, sizeof(config_path));
|
||||
if (core_info_has_custom_config(apple_core))
|
||||
core_info_get_custom_config(apple_core, config_path, sizeof(config_path));
|
||||
else
|
||||
strlcpy(config_path, g_defaults.config_path, sizeof(config_path));
|
||||
|
||||
|
@ -550,7 +550,7 @@ static void RunActionSheet(const char* title, const struct string_list* items, U
|
||||
nil]];
|
||||
|
||||
[settings addObject:[RAMenuItemBasic itemWithDescription:BOXSTRING("Core")
|
||||
action:^{ [weakSelf.navigationController pushViewController:[[RACoreSettingsMenu alloc] initWithCore:apple_core] animated:YES]; }]];
|
||||
action:^{ [weakSelf.navigationController pushViewController:[[RACoreSettingsMenu alloc] initWithCore:BOXSTRING(apple_core)] animated:YES]; }]];
|
||||
[settings addObject:[RAMenuItemBasic itemWithDescription:BOXSTRING("Core Options")
|
||||
action:^{ [weakSelf.navigationController pushViewController:[RACoreOptionsMenu new] animated:YES]; }]];
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ const void* apple_get_frontend_settings(void);
|
||||
- (void)showGameView;
|
||||
|
||||
- (void)loadingCore:(NSString*)core withFile:(const char*)file;
|
||||
- (void)unloadingCore:(NSString*)core;
|
||||
- (void)unloadingCore;
|
||||
|
||||
- (void)refreshSystemConfig;
|
||||
|
||||
|
@ -297,7 +297,7 @@ static void handle_touch_event(NSArray* touches)
|
||||
[self showGameView];
|
||||
}
|
||||
|
||||
- (void)unloadingCore:(NSString*)core
|
||||
- (void)unloadingCore
|
||||
{
|
||||
[self showPauseMenu:self];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user