mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-09-06 19:30:58 -04:00
Merge remote-tracking branch 'origin/dev' into mod-ui
This commit is contained in:
@@ -25,9 +25,7 @@ namespace zelda64 {
|
||||
std::filesystem::path get_asset_path(const char* asset) {
|
||||
std::filesystem::path base_path = "";
|
||||
#if defined(__APPLE__)
|
||||
const char* resource_dir = get_bundle_resource_directory();
|
||||
base_path = resource_dir;
|
||||
free((void*)resource_dir);
|
||||
base_path = get_bundle_resource_directory();
|
||||
#endif
|
||||
|
||||
return base_path / "assets" / asset;
|
||||
|
||||
@@ -12,9 +12,14 @@ namespace zelda64 {
|
||||
});
|
||||
}
|
||||
|
||||
const char* get_bundle_resource_directory() {
|
||||
std::filesystem::path get_bundle_resource_directory() {
|
||||
NSString *bundlePath = [[NSBundle mainBundle] resourcePath];
|
||||
return strdup([bundlePath UTF8String]);
|
||||
return std::filesystem::path([bundlePath UTF8String]);
|
||||
}
|
||||
|
||||
std::filesystem::path get_bundle_directory() {
|
||||
NSString *bundlePath = [[NSBundle mainBundle] bundlePath];
|
||||
return std::filesystem::path([bundlePath UTF8String]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user