mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Fix: items after the removed RCT1 theme have wrong index
This commit is contained in:
@@ -1397,6 +1397,14 @@ private:
|
||||
break;
|
||||
case WIDX_TITLE_MUSIC_DROPDOWN:
|
||||
{
|
||||
// HACK: When RCT1 is not available, it's not in the dropdown, so indices higher than it should be incremented
|
||||
const bool rct1MusicThemeIsAvailable = IsRCT1TitleMusicAvailable();
|
||||
for (size_t i = 0; i < std::size(TitleThemeOptions) && static_cast<int32_t>(i) <= dropdownIndex; i++)
|
||||
{
|
||||
if (TitleThemeOptions[i].Kind == TitleMusicKind::RCT1 && !rct1MusicThemeIsAvailable)
|
||||
dropdownIndex++;
|
||||
}
|
||||
|
||||
gConfigSound.TitleMusic = TitleThemeOptions[dropdownIndex].Kind;
|
||||
ConfigSaveDefault();
|
||||
Invalidate();
|
||||
|
||||
Reference in New Issue
Block a user