Closed senneschall closed 3 years ago
Hello, @senneschall ! Are you sure about this? I mean all preferences made in game, like speed, sound level etc. are not lost on application restart...
It's not Linux-only issue. You extract game to $HOME/fheroes2 for example. Then you change directory to $HOME and run game with command ./fheroes2/fheroes
. After that game saves config to current work dir but try read config by relative path from game dir. Similarly on windows, if you extract game to c:\fh, cd to c:\fh2, then run ..\fh\fheroes2.exe, you get same issue.
As workaround you should run game from game directory now.
I was actually running the game from the ubuntu start menu. The .desktop file ran the binary directly with a /home/<user>/Games/HoMM2/fheroes2
.
Adding a Path=/home/<user>/Games/HoMM2
did indeed resolve the issue, now the cfg from the game file is used and the one in $PATH can be deleted.
Most applications use one of the XDG DIRs on unix systems. Or use the folder where the binary lies instead of using the invoking path. Maybe that's an option for you?
There is issue #2860 for XDG compiliance. Someday it will be implemented.
IIRC it was in $HOME/.local/share/fheroes2 before, which would be a better folder to write the config/savegame/map files to
The problem is, it reads the fheroes.cfg from the game base folder, but saves it to $HOME and never reads from there again. So any change that is made ingame is lost when you restart fheroes2.