mirror of
https://github.com/LIV2/amiberry.git
synced 2025-12-06 06:32:45 +00:00
bugfix: when doing a Rescan ROMs, restore the originally selected ROM afterwards (fixes #1451)
This commit is contained in:
parent
db3953c758
commit
9d78ea1e07
@ -219,6 +219,8 @@ void make_rom_symlink(const std::string& kickstart_short_name, const int kicksta
|
||||
if (!std::filesystem::exists(kickstart_long_path))
|
||||
{
|
||||
const int roms[2] = { kickstart_number, -1 };
|
||||
// copy the existing prefs->romfile to a backup variable, so we can restore it afterwards
|
||||
const std::string old_romfile = prefs->romfile;
|
||||
if (configure_rom(prefs, roms, 0) == 1)
|
||||
{
|
||||
try {
|
||||
@ -236,6 +238,8 @@ void make_rom_symlink(const std::string& kickstart_short_name, const int kicksta
|
||||
}
|
||||
}
|
||||
}
|
||||
// restore the original prefs->romfile
|
||||
strcpy(prefs->romfile, old_romfile.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user