RSDKModding / RSDKv4-Decompilation

A complete decompilation of Sonic 1 & Sonic 2 (2013) & Retro Engine (v4)
Other
937 stars 175 forks source link

[Linux] RSDKv4 will overwrite the save slots of your game #342

Open uchuuchy opened 2 years ago

uchuuchy commented 2 years ago

RSDKv4 shares its files globally, including saves, this causes it to overwrite your save slot in Sonic 1 if you start to play Sonic 2 on the same save slot and vise versa.

Workaround: Use different save slots for the game, play Sonic 1 on save slot 1, play Sonic 2 on save slot 2 so the saves aren't overwritten.

EDIT: Just as a "btw," the fact that the files are shared globally isn't necessarily a bad thing since it is the same binary, and it is the same program, but, lots of programs and emulators allow you to keep files locally to the binary such as Ryujinx, by creating a folder called "portable" in the directory with the binary, it will store all config and settings inside that folder or sonic3air, you can create a folder called "savedata" in the directory with the binary and it'll store the save files, option changes, etc within that folder instead of the global one.

Zandengoff commented 2 years ago

Just wanted to pop in and confirm that this does not occur with the flatpak version.

luluco250 commented 2 years ago

@Zandengoff This happens exactly because of commits made to support the flatpak version, with no alternative to override the data folder. It will, rather aggressively, try to use .local/share/RSDKv4, even if you override the XDG_DATA_PATH folder to trick it into using another folder. This has been reported by users of my package on the Arch Linux user repository. In particular, it seems to have been changed by this PR: https://github.com/Rubberduckycooly/Sonic-1-2-2013-Decompilation/pull/283 The reason it works fine with Flatpak is because it does sandboxing, so each Flatpak app has its own .local/ folder built into it.