Fix portable mode on macOS (#552)

This commit is contained in:
squidbus
2025-03-23 12:23:44 -07:00
committed by GitHub
parent 1c8668fb65
commit 3d3524ffe7
4 changed files with 19 additions and 6 deletions
+9
View File
@@ -2,6 +2,7 @@
#include "recomp_input.h"
#include "zelda_sound.h"
#include "zelda_render.h"
#include "zelda_support.h"
#include "ultramodern/config.hpp"
#include "librecomp/files.hpp"
#include <filesystem>
@@ -136,6 +137,14 @@ std::filesystem::path zelda64::get_app_folder_path() {
return std::filesystem::current_path();
}
#if defined(__APPLE__)
// Check for portable file in the directory containing the app bundle.
const auto app_bundle_path = zelda64::get_bundle_directory().parent_path();
if (std::filesystem::exists(app_bundle_path / "portable.txt")) {
return app_bundle_path;
}
#endif
std::filesystem::path recomp_dir{};
#if defined(_WIN32)