From e4596f20b9324f6631bcf9196fe07a89e2aa46d5 Mon Sep 17 00:00:00 2001 From: meancoot Date: Mon, 4 Mar 2013 01:21:45 -0500 Subject: [PATCH] (iOS) Allow a custom display name to specified in a libretro core's info file. --- ios/RetroArch/RAModuleInfoList.m | 1 + ios/RetroArch/browser/RAModuleList.m | 2 +- ios/RetroArch/views.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/RetroArch/RAModuleInfoList.m b/ios/RetroArch/RAModuleInfoList.m index 8572567941..af3d0764d7 100644 --- a/ios/RetroArch/RAModuleInfoList.m +++ b/ios/RetroArch/RAModuleInfoList.m @@ -18,6 +18,7 @@ { RAModuleInfo* new = [RAModuleInfo new]; + new.displayName = [theData getStringNamed:@"display_name" withDefault:[[thePath lastPathComponent] stringByDeletingPathExtension]]; new.path = thePath; new.configPath = [NSString stringWithFormat:@"%@/%@.cfg", [RetroArch_iOS get].system_directory, [[thePath lastPathComponent] stringByDeletingPathExtension]]; new.data = theData; diff --git a/ios/RetroArch/browser/RAModuleList.m b/ios/RetroArch/browser/RAModuleList.m index 0894f1560e..3af24127e6 100644 --- a/ios/RetroArch/browser/RAModuleList.m +++ b/ios/RetroArch/browser/RAModuleList.m @@ -112,7 +112,7 @@ unsigned section = _sectionMap[indexPath.section]; RAModuleInfo* info = (RAModuleInfo*)[_modules[section] objectAtIndex:indexPath.row]; - cell.textLabel.text = [[info.path lastPathComponent] stringByDeletingPathExtension]; + cell.textLabel.text = info.displayName; cell.accessoryType = (info.data) ? UITableViewCellAccessoryDetailDisclosureButton : UITableViewCellAccessoryNone; return cell; diff --git a/ios/RetroArch/views.h b/ios/RetroArch/views.h index 58121ec0e0..71174e8e75 100644 --- a/ios/RetroArch/views.h +++ b/ios/RetroArch/views.h @@ -22,6 +22,7 @@ @end @interface RAModuleInfo : NSObject +@property (strong) NSString* displayName; @property (strong) NSString* path; @property (strong) NSString* configPath; @property (strong) RAConfig* data;