diff --git a/src/86box.c b/src/86box.c index fe5dcf5b7..50821b773 100644 --- a/src/86box.c +++ b/src/86box.c @@ -767,8 +767,10 @@ pc_init(int argc, char *argv[]) p = path_get_filename(exe_path); *p = '\0'; #if defined(__APPLE__) + char contents_path[2048] = {0}; c = strlen(exe_path); if ((c >= 16) && !strcmp(&exe_path[c - 16], "/Contents/MacOS/")) { + strncpy(contents_path, exe_path, c - 7); exe_path[c - 16] = '\0'; p = path_get_filename(exe_path); *p = '\0'; @@ -1035,10 +1037,18 @@ usage: path_append_filename(temp, usr_path, "assets"); asset_add_path(temp); - // Add the standard ROM path in the same directory as the executable. + // Add the standard asset path in the same directory as the executable. path_append_filename(temp, exe_path, "assets"); asset_add_path(temp); +#ifdef __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); + } +#endif + plat_init_asset_paths(); /*