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
112 stars 56 forks source link

choosing a new folder for VDFS doesn't start at the existing one on windows. #204

Open mark-usher opened 1 year ago

mark-usher commented 1 year ago

On windows... Line 1016 in gui-allegro.c if ((chooser = al_create_native_file_dialog(vdfs_get_root(), "Choose a folder to be the VDFS root - ", "*", ALLEGRO_FILECHOOSER_FOLDER))) { even though the vdfs root is correct and being returned, it isn't being set as the initial path in the allegro created dialog in windows. Allegro 5 bug?

SteveFosdick commented 1 year ago

This seems to be a feature of Allegro 5. Looking at the code in https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/win_dialog.c when the flag ALLEGRO_FILECHOOSER_FOLDER is passed in, almost all the work is done by a separate function that ignores the initial path specified and ends up calling a completely different Windows function than the one that browses for files.

The next step is probably to check if Allegro have this logged as a bug.

SteveFosdick commented 1 year ago

I have raised one: https://github.com/liballeg/allegro5/issues/1449

mark-usher commented 1 year ago

Thanks Steve :) I thought it was looking to be on the Allegro side as the variables were holding the expected values before it was handed off.

joecarl commented 9 months ago

The next Allegro release will fix this issue