mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-15 17:38:57 +02:00
[desktop, fs] main_window separation; fix Ryujinx save data link issues (#2929)
Some genius decided to put the entire MainWindow class into main.h and main.cpp, which is not only horrific practice but also completely destroys clangd beyond repair. Please, just don't do this. (this will probably merge conflict to hell and back) Also, fixes a bunch of issues with Ryujinx save data link: - Paths with spaces would cause mklink to fail - Add support for portable directories - Symlink detection was incorrect sometimes(????) - Some other stuff I'm forgetting Furthermore, when selecting "From Eden" and attempting to save in Ryujinx, Ryujinx would destroy the link for... some reason? So to get around this we just copy the Eden data to Ryujinx then treat it like a "From Ryujinx" op Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2929 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
parent
e13c7ef3f8
commit
08f3639c80
51 changed files with 5386 additions and 5283 deletions
|
|
@ -14,16 +14,29 @@ namespace fs = std::filesystem;
|
|||
|
||||
fs::path GetKvdbPath()
|
||||
{
|
||||
return GetLegacyPath(EmuPath::RyujinxDir) / "bis" / "system" / "save" / "8000000000000000" / "0"
|
||||
return GetKvdbPath(GetLegacyPath(EmuPath::RyujinxDir));
|
||||
}
|
||||
|
||||
fs::path GetKvdbPath(const fs::path& path) {
|
||||
return path / "bis" / "system" / "save" / "8000000000000000" / "0"
|
||||
/ "imkvdb.arc";
|
||||
}
|
||||
|
||||
fs::path GetRyuPathFromSavePath(const fs::path& path) {
|
||||
// This is a horrible hack, but I cba to find something better
|
||||
return path.parent_path().parent_path().parent_path().parent_path().parent_path();
|
||||
}
|
||||
|
||||
fs::path GetRyuSavePath(const u64 &save_id)
|
||||
{
|
||||
return GetRyuSavePath(GetLegacyPath(EmuPath::RyujinxDir), save_id);
|
||||
}
|
||||
|
||||
std::filesystem::path GetRyuSavePath(const std::filesystem::path& path, const u64& save_id) {
|
||||
std::string hex = fmt::format("{:016x}", save_id);
|
||||
|
||||
// TODO: what's the difference between 0 and 1?
|
||||
return GetLegacyPath(EmuPath::RyujinxDir) / "bis" / "user" / "save" / hex / "0";
|
||||
// TODO: what's the difference between 0 and 1?
|
||||
return path / "bis" / "user" / "save" / hex / "0";
|
||||
}
|
||||
|
||||
IMENReadResult ReadKvdb(const fs::path &path, std::vector<IMEN> &imens)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue