mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2025-10-30 08:03:03 +00:00
Fix define on flatpak, add cwd behavior.
This commit is contained in:
parent
c70908bfd6
commit
094f47d5b5
2 changed files with 9 additions and 2 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
"./N64Recomp us.rev1.toml",
|
"./N64Recomp us.rev1.toml",
|
||||||
"./RSPRecomp aspMain.us.rev1.toml",
|
"./RSPRecomp aspMain.us.rev1.toml",
|
||||||
"./RSPRecomp njpgdspMain.us.rev1.toml",
|
"./RSPRecomp njpgdspMain.us.rev1.toml",
|
||||||
"cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_MAKE_PROGRAM=ninja -DPATCHES_C_COMPILER=clang -DPATCHES_LD=ld.lld -DRECOMP_FLATPAK -G Ninja -S . -B cmake-build",
|
"cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_MAKE_PROGRAM=ninja -DPATCHES_C_COMPILER=clang -DPATCHES_LD=ld.lld -DRECOMP_FLATPAK=ON -G Ninja -S . -B cmake-build",
|
||||||
"cmake --build cmake-build --config Release --target Zelda64Recompiled --parallel",
|
"cmake --build cmake-build --config Release --target Zelda64Recompiled --parallel",
|
||||||
"rm -rf assets/scss",
|
"rm -rf assets/scss",
|
||||||
"mkdir -p /app/bin",
|
"mkdir -p /app/bin",
|
||||||
|
|
|
||||||
|
|
@ -601,7 +601,14 @@ int main(int argc, char** argv) {
|
||||||
// Force wasapi on Windows, as there seems to be some issue with sample queueing with directsound currently.
|
// Force wasapi on Windows, as there seems to be some issue with sample queueing with directsound currently.
|
||||||
SDL_setenv("SDL_AUDIODRIVER", "wasapi", true);
|
SDL_setenv("SDL_AUDIODRIVER", "wasapi", true);
|
||||||
#endif
|
#endif
|
||||||
//printf("Current dir: %ls\n", std::filesystem::current_path().c_str());
|
|
||||||
|
#if defined(__linux__) && defined(RECOMP_FLATPAK)
|
||||||
|
// When using Flatpak, applications tend to launch from the home directory by default.
|
||||||
|
// Mods might use the current working directory to store the data, so we switch it to a directory
|
||||||
|
// with persistent data storage and write permissions under Flatpak to ensure it works.
|
||||||
|
std::error_code ec;
|
||||||
|
std::filesystem::current_path("/var/data", ec);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Initialize SDL audio and set the output frequency.
|
// Initialize SDL audio and set the output frequency.
|
||||||
SDL_InitSubSystem(SDL_INIT_AUDIO);
|
SDL_InitSubSystem(SDL_INIT_AUDIO);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue