ios: Disable cover-art views if UICollectionView is not available.

This commit is contained in:
meancoot 2013-02-20 20:10:44 -05:00
parent 1edd531544
commit b36ead4bf8
2 changed files with 10 additions and 7 deletions

View File

@ -808,7 +808,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RetroArch/RetroArch-Prefix.pch"; GCC_PREFIX_HEADER = "RetroArch/RetroArch-Prefix.pch";
INFOPLIST_FILE = "RetroArch/RetroArch-Info.plist"; INFOPLIST_FILE = "RetroArch/RetroArch-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0; IPHONEOS_DEPLOYMENT_TARGET = 6.1;
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)\"", "\"$(SRCROOT)\"",
@ -844,7 +844,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RetroArch/RetroArch-Prefix.pch"; GCC_PREFIX_HEADER = "RetroArch/RetroArch-Prefix.pch";
INFOPLIST_FILE = "RetroArch/RetroArch-Info.plist"; INFOPLIST_FILE = "RetroArch/RetroArch-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0; IPHONEOS_DEPLOYMENT_TARGET = 6.1;
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)\"", "\"$(SRCROOT)\"",

View File

@ -46,10 +46,13 @@ static NSString* check_path(NSString* path)
{ {
path = check_path(path); path = check_path(path);
if ([UICollectionViewController instancesRespondToSelector:@selector(initWithCollectionViewLayout:)])
{
NSString* coverDir = path ? [path stringByAppendingPathComponent:@".coverart"] : nil; NSString* coverDir = path ? [path stringByAppendingPathComponent:@".coverart"] : nil;
if (coverDir && ra_ios_is_directory(coverDir) && ra_ios_is_file([coverDir stringByAppendingPathComponent:@"template.png"])) if (coverDir && ra_ios_is_directory(coverDir) && ra_ios_is_file([coverDir stringByAppendingPathComponent:@"template.png"]))
return [[RADirectoryGrid alloc] initWithPath:path filter:regex]; return [[RADirectoryGrid alloc] initWithPath:path filter:regex];
else }
return [[RADirectoryList alloc] initWithPath:path filter:regex]; return [[RADirectoryList alloc] initWithPath:path filter:regex];
} }