mirror of https://github.com/stella-emu/stella.git
fixed forced full redraws
force full UI redraw when UI palette changes
This commit is contained in:
parent
bc7ac83c49
commit
15576fe6b1
|
@ -889,6 +889,8 @@ void FrameBuffer::setUIPalette()
|
|||
myFullPalette[j] = mapRGB(r, g, b);
|
||||
}
|
||||
FBSurface::setPalette(myFullPalette);
|
||||
if(&myOSystem.eventHandler())
|
||||
update(true);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -217,10 +217,13 @@ void Dialog::positionAt(uInt32 pos)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Dialog::redraw()
|
||||
void Dialog::redraw(bool force)
|
||||
{
|
||||
if(!isVisible() || !needsRedraw())
|
||||
return;// false;
|
||||
if(!isVisible())
|
||||
return;
|
||||
|
||||
if(force)
|
||||
setDirty();
|
||||
|
||||
// Draw this dialog
|
||||
setPosition();
|
||||
|
|
|
@ -64,7 +64,7 @@ class Dialog : public GuiObject
|
|||
|
||||
void tick() override;
|
||||
bool isChainDirty() const override;
|
||||
void redraw();
|
||||
void redraw(bool force = false);
|
||||
void render();
|
||||
|
||||
void addFocusWidget(Widget* w) override;
|
||||
|
|
|
@ -102,8 +102,8 @@ void DialogContainer::draw(bool full)
|
|||
|
||||
// Draw and render all dirty dialogs
|
||||
myDialogStack.applyAll([&](Dialog*& d) {
|
||||
if(d->needsRedraw())
|
||||
d->redraw();
|
||||
if(full || d->needsRedraw())
|
||||
d->redraw(full);
|
||||
});
|
||||
// Always render all surfaces, bottom to top
|
||||
render();
|
||||
|
|
Loading…
Reference in New Issue