The AutoMountImage can now handle .LST files.

This commit is contained in:
Stephen White 2018-07-29 16:47:32 +10:00
parent 09cfc4ec86
commit ef7dfb1907
1 changed files with 22 additions and 15 deletions

View File

@ -1349,24 +1349,31 @@ void FileBrowser::SelectAutoMountImage(const char* image)
f_chdir("/1541"); f_chdir("/1541");
RefreshFolderEntries(); RefreshFolderEntries();
FileBrowser::BrowsableList::Entry* current = 0; if (SelectLST(image))
int index;
int maxEntries = folder.entries.size();
for (index = 0; index < maxEntries; ++index)
{ {
current = &folder.entries[index]; selectionsMade = true;
if (strcasecmp(current->filImage.fname, image) == 0)
{
break;
}
} }
else
if (index != maxEntries)
{ {
ClearSelections(); FileBrowser::BrowsableList::Entry* current = 0;
caddySelections.entries.push_back(*current); int index;
selectionsMade = FillCaddyWithSelections(); int maxEntries = folder.entries.size();
for (index = 0; index < maxEntries; ++index)
{
current = &folder.entries[index];
if (strcasecmp(current->filImage.fname, image) == 0)
{
break;
}
}
if (index != maxEntries)
{
ClearSelections();
caddySelections.entries.push_back(*current);
selectionsMade = FillCaddyWithSelections();
}
} }
} }