Add an asset path within the AppImage (in case XDG_DATA_DIRS is not the AppImage default)

This commit is contained in:
RichardG867
2025-12-20 16:07:20 -03:00
parent da146ac7df
commit 34e835a4f0

View File

@@ -1041,12 +1041,19 @@ usage:
path_append_filename(temp, exe_path, "assets");
asset_add_path(temp);
#ifdef __APPLE__
#if defined(__APPLE__)
// Add the standard asset path within the app bundle.
if (contents_path[0] != '\0') {
path_append_filename(temp, contents_path, "Resources/assets");
asset_add_path(temp);
}
#elif !defined(_WIN32)
// Add the standard asset path within the AppImage.
p = getenv("APPDIR");
if (p && (p[0] != '\0')) {
path_append_filename(temp, p, "usr/local/share/" EMU_NAME "/assets");
asset_add_path(temp);
}
#endif
plat_init_asset_paths();