(iOS) Various:

Re-add default config generation code, if a config file didn't exist it would not be possible to change settings while running.
   Sort emulator core list.
   Add .info files for more emulators.
This commit is contained in:
meancoot 2013-03-10 13:53:09 -04:00
parent e9497abc61
commit debf31b7a4
10 changed files with 54 additions and 3 deletions

View File

@ -114,6 +114,8 @@
- (void)runGame:(NSString*)path
{
assert(self.moduleInfo);
[RASettingsList refreshConfigFile];
const char* const sd = [[RetroArch_iOS get].system_directory UTF8String];
const char* const cf = (ra_ios_is_file(self.moduleInfo.configPath)) ? [self.moduleInfo.configPath UTF8String] : 0;

View File

@ -60,7 +60,18 @@
else
[_other addObject:module];
}
// Sort
[_supported sortUsingComparator:^(RAModuleInfo* left, RAModuleInfo* right)
{
return [left.displayName caseInsensitiveCompare:right.displayName];
}];
[_other sortUsingComparator:^(RAModuleInfo* left, RAModuleInfo* right)
{
return [left.displayName caseInsensitiveCompare:right.displayName];
}];
[self setTitle:[_game lastPathComponent]];
return self;
}

View File

@ -105,6 +105,11 @@ static RASettingData* custom_action(NSString* action)
}
@implementation RASettingsList
+ (void)refreshConfigFile
{
(void)[[RASettingsList alloc] init];
}
- (id)init
{
RAConfig* config = [[RAConfig alloc] initWithPath:[RetroArch_iOS get].moduleInfo.configPath];
@ -123,9 +128,9 @@ static RASettingData* custom_action(NSString* action)
[NSArray arrayWithObjects:@"Video",
boolean_setting(config, @"video_smooth", @"Smooth Video", @"true"),
boolean_setting(config, @"video_crop_overscan", @"Crop Overscan", @"true"),
subpath_setting(config, @"video_bsnes_shader", @"Shader", @"", shader_path, @"shader"),
aspect_setting(config, @"Aspect Ratio"),
boolean_setting(config, @"video_scale_integer", @"Integer Scaling", @"false"),
aspect_setting(config, @"Aspect Ratio"),
subpath_setting(config, @"video_bsnes_shader", @"Shader", @"", shader_path, @"shader"),
nil],
[NSArray arrayWithObjects:@"Audio",
@ -191,6 +196,7 @@ static RASettingData* custom_action(NSString* action)
- (void)dealloc
{
RAConfig* config = [[RAConfig alloc] initWithPath:[RetroArch_iOS get].moduleInfo.configPath];
[config putStringNamed:@"system_directory" value:[RetroArch_iOS get].system_directory];
[self writeSettings:nil toConfig:config];
[config writeToFile:[RetroArch_iOS get].moduleInfo.configPath];
[[RetroArch_iOS get] refreshConfig];

View File

@ -162,6 +162,7 @@ static const char* const SETTINGID = "SETTING";
{
cell = [self.tableView dequeueReusableCellWithIdentifier:@"enumeration"];
cell = cell ? cell : [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"enumeration"];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
break;

View File

@ -48,4 +48,5 @@ enum SettingTypes
@end
@interface RASettingsList : RASettingsSubList
+ (void)refreshConfigFile;
@end

View File

@ -0,0 +1,6 @@
display_name = "Neo Geo Pocket (Color)"
supported_extensions = "ngp|ngc"
emuname = "Mednafen Neopop"
manufacturer = "SNK"
systemname = "Neo Geo Pocket (Color)"

View File

@ -0,0 +1,6 @@
display_name = "PC Engine/TurboGrafx-16"
supported_extensions = "pce|sgx|cue"
emuname = "Mednafen PCE Fast"
manufacturer = "NEC"
systemname = "PC Engine/TurboGrafx-16"

View File

@ -0,0 +1,6 @@
display_name = "PlayStation"
supported_extensions = "cue|toc"
emuname = "Mednafen PSX"
manufacturer = "Sony"
systemname = "PlayStation"

View File

@ -0,0 +1,6 @@
display_name = "Virtual Boy"
supported_extensions = "vb|vboy|bin"
emuname = "Mednafen VB"
manufacturer = "Nintendo"
systemname = "Virtual Boy"

View File

@ -0,0 +1,6 @@
display_name = "WonderSwan (Color)"
supported_extensions = "ws|wsc"
emuname = "Mednafen WonderSwan"
manufacturer = "Bandai"
systemname = "WonderSwan (Color)"