Codechange: use _cur_palette the same in all the drivers
It was a bit of a mixed bag. With this change, gfx.cpp is in control who accesses _cur_palette from the video-drivers.
This commit is contained in:
committed by
Patric Stout
parent
1ed7afc0a8
commit
74186998a2
@@ -43,9 +43,7 @@ void VideoDriver_SDL_Base::MakeDirty(int left, int top, int width, int height)
|
||||
|
||||
void VideoDriver_SDL_Base::CheckPaletteAnim()
|
||||
{
|
||||
if (_cur_palette.count_dirty == 0) return;
|
||||
|
||||
this->local_palette = _cur_palette;
|
||||
if (!CopyPalette(this->local_palette)) return;
|
||||
this->MakeDirty(0, 0, _screen.width, _screen.height);
|
||||
}
|
||||
|
||||
@@ -131,10 +129,7 @@ void VideoDriver_SDL_Base::ClientSizeChanged(int w, int h, bool force)
|
||||
{
|
||||
/* Allocate backing store of the new size. */
|
||||
if (this->AllocateBackingStore(w, h, force)) {
|
||||
/* Mark all palette colours dirty. */
|
||||
_cur_palette.first_dirty = 0;
|
||||
_cur_palette.count_dirty = 256;
|
||||
this->local_palette = _cur_palette;
|
||||
CopyPalette(this->local_palette, true);
|
||||
|
||||
BlitterFactory::GetCurrentBlitter()->PostResize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user