Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,17 @@ jobs:
cp opensave-decky-plugin/package.json decky-pkg/OpenSave/
cp opensave-decky-plugin/main.py decky-pkg/OpenSave/
cp opensave-decky-plugin/dist/index.js decky-pkg/OpenSave/dist/
# The zip says the version of the tag it is released under. Plugin
# managers compare the two, and a mismatch offers the same update
# again and again (#149). A manual run has no tag: it keeps the files'.
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
V="${GITHUB_REF_NAME#v}"
for f in plugin.json package.json; do
jq --arg v "$V" '.version = $v' "decky-pkg/OpenSave/$f" > "$f.stamped"
mv "$f.stamped" "decky-pkg/OpenSave/$f"
test "$(jq -r .version "decky-pkg/OpenSave/$f")" = "$V"
done
fi
(cd decky-pkg && zip -r ../OpenSave-decky-plugin.zip OpenSave)
unzip -l OpenSave-decky-plugin.zip

Expand Down
2 changes: 1 addition & 1 deletion internal/presets/presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var presetDefs = []preset{
LinuxPath: []string{"~/.config/PCSX2/memcards", "~/.var/app/net.pcsx2.PCSX2/config/PCSX2/memcards"}},
{ID: "rpcs3", Name: "RPCS3 PS3 Emulator", Type: "emulator", Path: "%APPDATA%/rpcs3/dev_hdd0/home/00000001/savedata",
LinuxPath: []string{"~/.config/rpcs3/dev_hdd0/home/00000001/savedata", "~/.var/app/net.rpcs3.RPCS3/config/rpcs3/dev_hdd0/home/00000001/savedata"}},
{ID: "cemu", Name: "Cemu Wii U Emulator", Type: "emulator", Path: "%USERPROFILE%/Documents/Cemu/mlc01/usr/save",
{ID: "cemu", Name: "Cemu Wii U Emulator", Type: "emulator", Path: "%APPDATA%/Cemu/mlc01/usr/save",
LinuxPath: []string{"~/.local/share/Cemu/mlc01/usr/save", "~/.var/app/info.cemu.Cemu/data/Cemu/mlc01/usr/save"}},
{ID: "ppsspp", Name: "PPSSPP PSP Emulator", Type: "emulator", Path: "%USERPROFILE%/Documents/PPSSPP/PSP/SAVEDATA",
LinuxPath: []string{"~/.config/ppsspp/PSP/SAVEDATA", "~/.var/app/org.ppsspp.PPSSPP/config/ppsspp/PSP/SAVEDATA"}},
Expand Down
20 changes: 18 additions & 2 deletions internal/presets/retro_emulators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func TestRetroEmulatorPresetsResolveOnLinux(t *testing.T) {
"fceux": ".fceux/sav",
"mesen": ".local/share/Mesen2/Saves",
"blastem": ".local/share/blastem",
"cemu": ".local/share/Cemu/mlc01/usr/save",
}

for id, rel := range cases {
Expand All @@ -54,14 +55,29 @@ func TestRetroEmulatorPresetsResolveOnLinux(t *testing.T) {
}
}

// Cemu's own default on Windows is %APPDATA%\Cemu\mlc01 (CemuApp::DeterminePaths,
// ActiveSettings::GetDefaultMLCPath). The preset named Documents\Cemu, a folder
// Cemu never picks, so a default install was not found at all.
func TestCemuWindowsPathIsCemusDefault(t *testing.T) {
for _, p := range presetDefs {
if p.ID == "cemu" {
if want := "%APPDATA%/Cemu/mlc01/usr/save"; p.Path != want {
t.Errorf("cemu Windows path = %q, want %q", p.Path, want)
}
return
}
}
t.Fatal("no cemu preset")
}

// Every preset must carry a Linux path unless the emulator genuinely is
// Windows-only. A Windows-only entry is a real choice (Cemu, Xenia, Project64);
// Windows-only. A Windows-only entry is a real choice (Xenia, Project64);
// an accidentally Windows-only one silently excludes every Deck user, which is
// the audience most likely to be running these.
func TestRetroEmulatorPresetsCoverLinuxExceptWindowsOnlyOnes(t *testing.T) {
// Emulators with no Linux build worth detecting.
windowsOnly := map[string]bool{
"xenia": true, "cemu": true, "project64": true,
"xenia": true, "project64": true,
}

for _, p := range presetDefs {
Expand Down
Loading