update Xcode project

This commit is contained in:
2019-02-14 13:30:57 +01:00
parent fa9d7a107b
commit 6aca330db3
2 changed files with 22 additions and 3 deletions

View File

@@ -160,9 +160,12 @@ bool Asset::open(const char* path)
}
#else
#ifdef __APPLE__
NSString* bundle_path = [[NSBundle mainBundle] resourcePath];
std::string base = [bundle_path cStringUsingEncoding:1];
file_path = base + "/" + path;
if (is_asset(path))
{
NSString* bundle_path = [[NSBundle mainBundle] resourcePath];
std::string base = [bundle_path cStringUsingEncoding:1];
file_path = base + "/" + path;
}
#endif
//LOG("asset file: %s", file_path.c_str());
if (!(m_fp = fopen(file_path.c_str(), "rb")))