Skip to content

Commit 716e06e

Browse files
committed
fullPathForFilename search order changed to go through resolutions first and the search paths.
Packages work with additional search paths. Since packages usually contain only one resolution it may occur that an asset that should be replaced with the asset is found first before the asset is searched. That was the case with the previous search order.
1 parent 8533055 commit 716e06e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cocos2d/Support/CCFileUtils.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,10 @@ -(NSString*) fullPathForFilename:(NSString*)filename contentScale:(CGFloat *)con
501501
BOOL found = NO;
502502
NSString *ret = @"";
503503

504-
for( NSString *path in _searchPath ) {
505-
506-
// Search with Suffixes
507-
for( NSString *device in _searchResolutionsOrder ) {
504+
// Search with Suffixes
505+
for( NSString *device in _searchResolutionsOrder ) {
506+
507+
for( NSString *path in _searchPath ) {
508508

509509
NSString *fileWithPath = [path stringByAppendingPathComponent:newfilename];
510510

0 commit comments

Comments
 (0)