(OSX) Replace some ObjC literals for Snow Leopard backwards

compatibility - should be code reviewed
This commit is contained in:
twinaphex 2013-11-09 01:14:50 +01:00
parent b20f8670b0
commit 03495fdc3a
3 changed files with 5 additions and 5 deletions

View File

@ -98,8 +98,8 @@ static const char* get_axis_name(const rarch_setting_t* setting)
if (min || max)
{
self.minimum = @(min);
self.maximum = @(max);
self.minimum = [NSNumber numberWithInt:min];
self.maximum = [NSNumber numberWithInt:max];
}
return self;

View File

@ -399,7 +399,7 @@ void apple_gfx_ctx_update_window_title(void)
// If it poses a problem it should be changed to dispatch_sync.
dispatch_async(dispatch_get_main_queue(),
^{
g_view.window.title = @(text);
g_view.window.title = [NSString stringWithCString:text encoding:NSUTF8StringEncoding];
});
}
#endif

View File

@ -38,11 +38,11 @@ NSArray* apple_get_modules()
core_info_t* core = &coreList->list[i];
RAModuleInfo* newInfo = [RAModuleInfo new];
newInfo.path = @(core->path);
newInfo.path = [NSString stringWithCString:core->path encoding:NSUTF8StringEncoding];
newInfo.baseName = newInfo.path.lastPathComponent.stringByDeletingPathExtension;
newInfo.info = core;
newInfo.data = core->data;
newInfo.description = @(core->display_name);
newInfo.description = [NSString stringWithCString:core->display_name encoding:NSUTF8StringEncoding];
newInfo.customConfigFile = [NSString stringWithFormat:@"%@/%@.cfg", apple_platform.configDirectory, newInfo.baseName];
newInfo.configFile = newInfo.hasCustomConfig ? newInfo.customConfigFile : apple_platform.globalConfigFile;