Alternate Windows's save directory for love.filesystem
Posted: Sat Apr 20, 2024 1:57 pm
Hello!
Reading about love.filesystem on Love wiki, i saw that it creates a sandboxed environment and exposes only a subfolder (either Love\<game> for unfused or just <game> if fused) within %AppData% (C:\Users\<user>\AppData\Roaming) to be written by the game.
Althrough i'm okay with the sandbox aspect, i would like to know if there is a way to change the default save folder (on Windows only) from %AppData% to another Known Folder, like Documents/My Documents or even Saved Games (that should be the default for games to store save data at least until Windows 7). A little OCD trigger from my IT days seeing such kind of data being written under the AppData\Roaming folder.
There is a C/C++ function in Windows API that can fetch the path of such kind of "special" folder (since they can be moved around by the user), but i'm not proeficient enough in C/C++ to try to apply it via ffi and modify the love.filesystem to reflect this change (on Windows-only, of course).
Reading about love.filesystem on Love wiki, i saw that it creates a sandboxed environment and exposes only a subfolder (either Love\<game> for unfused or just <game> if fused) within %AppData% (C:\Users\<user>\AppData\Roaming) to be written by the game.
Althrough i'm okay with the sandbox aspect, i would like to know if there is a way to change the default save folder (on Windows only) from %AppData% to another Known Folder, like Documents/My Documents or even Saved Games (that should be the default for games to store save data at least until Windows 7). A little OCD trigger from my IT days seeing such kind of data being written under the AppData\Roaming folder.
There is a C/C++ function in Windows API that can fetch the path of such kind of "special" folder (since they can be moved around by the user), but i'm not proeficient enough in C/C++ to try to apply it via ffi and modify the love.filesystem to reflect this change (on Windows-only, of course).