Cleaned up some code.

This commit is contained in:
Alex Szpakowski
2014-09-21 19:50:02 -03:00
parent 7948b11082
commit c6b610d116
5 changed files with 36 additions and 63 deletions
+5 -7
View File
@@ -34,13 +34,11 @@ std::string getLoveInResources()
@autoreleasepool
{
// check to see if there are any .love files in Resources - props to stevejohnson/diordna
NSArray *lovePaths = [[NSBundle mainBundle] pathsForResourcesOfType:@"love" inDirectory:nil];
if ([lovePaths count] > 0)
{
NSString *firstLovePath = [lovePaths objectAtIndex:0];
path = std::string([firstLovePath UTF8String]);
}
// Check to see if there are any .love files in Resources.
NSString *lovepath = [[NSBundle mainBundle] pathForResource:nil ofType:@"love"];
if (lovepath != nil)
path = [lovepath UTF8String];
}
return path;