macOS/iOS: Add resources to the bundle
This commit is contained in:
parent
bf1dc2a7ce
commit
0f924528ba
3 changed files with 64 additions and 37 deletions
|
|
@ -63,8 +63,8 @@ SDL_RWops *OpenAsset(const char *filename, bool threadsafe)
|
|||
if ((rwops = SDL_RWFromFile(path.c_str(), "rb")) != nullptr)
|
||||
return rwops;
|
||||
|
||||
#ifdef __ANDROID__
|
||||
// On Android, fall back to the APK's assets.
|
||||
#if defined(__ANDROID__) || defined(__APPLE__)
|
||||
// Fall back to the bundled assets on supported systems.
|
||||
// This is handled by SDL when we pass a relative path.
|
||||
if (!paths::AssetsPath().empty() && (rwops = SDL_RWFromFile(relativePath.c_str(), "rb")))
|
||||
return rwops;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue