switched user palette loading to on demand

This commit is contained in:
Thomas Jentzsch 2021-05-04 23:04:44 +02:00
parent a86c63fa86
commit 54af434260
1 changed files with 4 additions and 2 deletions

View File

@ -26,8 +26,6 @@
PaletteHandler::PaletteHandler(OSystem& system)
: myOSystem{system}
{
// Load user-defined palette for this ROM
loadUserPalette();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -315,6 +313,10 @@ void PaletteHandler::setPalette()
{
const string& name = myOSystem.settings().getString("palette");
// Load user-defined palette for this ROM
if(name == SETTING_USER)
loadUserPalette();
// Look at all the palettes, since we don't know which one is
// currently active
static constexpr BSPF::array2D<const PaletteArray*, PaletteType::NumTypes, int(ConsoleTiming::numTimings)> palettes = {{