Skip to content

Commit

Permalink
refactor: Use CD32 model as a fallback for CD auto-detection (fixes #…
Browse files Browse the repository at this point in the history
…1325)

Instead of checking for CDTV, then CD32 and as a fallback going for A1200CD, we will look for CDTV and use CD32 as a fallback always.

Most of the titles will be in those two categories anyway, and many might not contain that in the file path, leading to incorrectly trying to boot them (and failing) as an A1200 CD config.
  • Loading branch information
midwan committed May 24, 2024
1 parent 1e081a3 commit ea58c3c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/osdep/amiberry_whdbooter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,26 +355,20 @@ void cd_auto_prefs(uae_prefs* prefs, char* filepath)
prefs->start_gui = false;

const auto is_cdtv = _tcsstr(filepath, _T("CDTV")) != nullptr || _tcsstr(filepath, _T("cdtv")) != nullptr;
const auto is_cd32 = _tcsstr(filepath, _T("CD32")) != nullptr || _tcsstr(filepath, _T("cd32")) != nullptr;
bool is_cd32 = false;

// CD32
if (is_cd32)
{
_tcscpy(prefs->description, _T("AutoBoot Configuration [CD32]"));
// SET THE BASE AMIGA (CD32)
built_in_prefs(prefs, 8, 3, 0, 0);
}
else if (is_cdtv)
if (is_cdtv)
{
_tcscpy(prefs->description, _T("AutoBoot Configuration [CDTV]"));
// SET THE BASE AMIGA (CDTV)
built_in_prefs(prefs, 9, 0, 0, 0);
}
else
{
_tcscpy(prefs->description, _T("AutoBoot Configuration [A1200CD]"));
// SET THE BASE AMIGA (Expanded A1200)
built_in_prefs(prefs, 4, A1200_CONFIG, 0, 0);
is_cd32 = true;
_tcscpy(prefs->description, _T("AutoBoot Configuration [CD32]"));
// SET THE BASE AMIGA (CD32)
built_in_prefs(prefs, 8, 3, 0, 0);
}

// enable CD
Expand Down

0 comments on commit ea58c3c

Please sign in to comment.