#!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3 ''' Convert Yuzu saves to Ryujinx by putting them in profile 0 (RyuPlayer) Note that this is rather destructive and won't deal well with multiple profiles, so back saves up before trying it (if anyone wants to modify it, it's CC0) ''' from pathlib import Path import os import shutil import struct import typing RYUJINX_DIR = Path.home() / ".config" / "Ryujinx" YUZU_DIR = Path.home() / ".local" / "share" / "yuzu" def get_yuzu_save_dir(): profile_path = YUZU_DIR / "nand" / "system" / "save" / "8000000000000010" / "su" / "avators" / "profiles.dat" with open(profile_path, "rb") as f: # Just go with profile 0 uid_low, uid_high = struct.unpack("