Remember last accessed directories between sessions
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
If I open a game, snapshot, etc., Vice opens a file chooser dialog in my home directory. I navigate to my C64 directory, select and load a file. If I load e.g. another game, the file chooser opens in the directory of the most recently loaded file. So far so good.
However, if I now restart Vice, the file chooser again opens in my home directory, and I have to -- again -- navigate to the directory where my C64 files are. Since I guess most people will have a dedicated directory for their C64 library, I believe the feature of remembering the last (or a few recent) directories would not go amiss.
What port are you talking about? Seeing your previous bug report I assume Unix (you mention vicerc).
I'll have a look at implementing this, first for SDL, the port we're currently concentrating on. And maybe later for other ports, though I think Win32 already uses the last dir used.
Ah yes, I forgot about that. I use
gnomeuion Linux Mint, but it is true for the default UI as well. Gnome does have a Recently used "directory" in the file chooser, but that contains only the files, not the directories. Of course, I could select one of the (say)d64files from Recently used, open it, and then do Smart-attach again, because now the file chooser will open in the directory of that file, but that's a lot of clicking.I'm working on/planning some sort of 'session' support. Thing is, this will require updating the
resource_int_tandresource_str_ttypes with an extra field. And since we have over 800 resources, that will cause a shitload of missing-initializer warnings.I could use the
resource_event_relevant_t event_relevantfield, renaming it toresource_flagsand using an enum of{ 0x000 = SAVE_TO_VICERC, 0x100 = SAVE_TO_SESSIONRC. 0x200 = DONT_SAVE }OR'ed with theresource_event_relevant_tenum values.That way I avoid having to update 800+ resource initializers, not to mention tracking down the 'dynamically' generated resources.
I know using bit-masking magic is a bit of a hack, but would at least avoid hundreds of warnings, which I won't always be able to fix, seeing how many ports we have.
Ticket moved from /p/vice-emu/bugs/907/
Can't be converted: