stardot / b-em

An opensource BBC Micro emulator for Win32 and Linux
http://stardot.org.uk/forums/viewtopic.php?f=4&t=10823
GNU General Public License v2.0
117 stars 58 forks source link

VDFS: Changing VDFS root isn't kept if the emulator doesn't exit cleanly #202

Open mark-usher opened 1 year ago

mark-usher commented 1 year ago

If the VDFS root is changed it is not remembered by the emulator until the emulator is cleanly shut down. Thus if the VDFS root is changed, a program is run and it crashes, the emulator needs to have the VDFS root changed again when restarting.

SteveFosdick commented 1 year ago

I have pushed a commit, https://github.com/stardot/b-em/commit/a55f951169947fcd6e1dd67bbcb36f1c601e816f, to save the config file after a change of VDFS root. There are lots of other settings that are also not immediately saved - saving the config usually happens on exit and immediately before a change of model to the model-specific ROM config can be saved.

If you have found a reproducible way to crash the emulator itself so the config file is not saved then that would be worth reporting as a bug.

mark-usher commented 1 year ago

Thank you Steve. Primarily it is a bad program in development crashing the emulator as it would a real machine, rather than the emulator itself. The other scenario was if the PC goes into sleep mode, the emulator shuts down and the settings aren't saved. Serves me right for not staying at the computer longer. Would it be possible for the VDFS root selection dialog box to open at the currently selected location, or if not available the B-em directory?