Init systemColorMaps after output module init.

It is done only once after the output module is initialized. It is also
adjusted to whatever ROM is being loaded.
This commit is contained in:
Edênis Freindorfer Azevedo 2020-03-04 19:40:39 -03:00 committed by Rafael Kitover
parent cd029ae696
commit 060010699d
1 changed files with 5 additions and 6 deletions

View File

@ -1078,13 +1078,15 @@ void GameArea::OnIdle(wxIdleEvent& event)
// set focus to panel
w->SetFocus();
// generate system color maps (after output module init)
if (loaded == IMAGE_GBA) utilUpdateSystemColorMaps(gbaLcdFilter);
else if (loaded == IMAGE_GB) utilUpdateSystemColorMaps(gbLcdFilter);
else utilUpdateSystemColorMaps(false);
}
mf->PollJoysticks();
if (loaded == IMAGE_GBA) utilUpdateSystemColorMaps(gbaLcdFilter);
else if (loaded == IMAGE_GB) utilUpdateSystemColorMaps(gbLcdFilter);
if (!paused) {
HidePointer();
event.RequestMore();
@ -1471,9 +1473,6 @@ DrawingPanelBase::DrawingPanelBase(int _width, int _height)
systemBlueShift = 0;
RGB_LOW_BITS_MASK = 0x0421;
}
// needs to be run once before the first draw
utilUpdateSystemColorMaps(false);
}
DrawingPanel::DrawingPanel(wxWindow* parent, int _width, int _height)