Changeset - r25724:cf37407a0fa2
[Not reviewed]
master
0 11 0
Patric Stout - 3 years ago 2021-06-17 08:34:43
truebrain@openttd.org
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.
11 files changed with 98 insertions and 95 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -1198,12 +1198,36 @@ void DoPaletteAnimations();
 
void GfxInitPalettes()
 
{
 
	memcpy(&_cur_palette, &_palette, sizeof(_cur_palette));
 
	DoPaletteAnimations();
 
}
 

	
 
/**
 
 * Copy the current palette if the palette was updated.
 
 * Used by video-driver to get a current up-to-date version of the palette,
 
 * to avoid two threads accessing the same piece of memory (with a good chance
 
 * one is already updating the palette while the other is drawing based on it).
 
 * @param local_palette The location to copy the palette to.
 
 * @param force_copy Whether to ignore if there is an update for the palette.
 
 * @return True iff a copy was done.
 
 */
 
bool CopyPalette(Palette &local_palette, bool force_copy)
 
{
 
	if (!force_copy && _cur_palette.count_dirty == 0) return false;
 

	
 
	local_palette = _cur_palette;
 
	_cur_palette.count_dirty = 0;
 

	
 
	if (force_copy) {
 
		local_palette.first_dirty = 0;
 
		local_palette.count_dirty = 256;
 
	}
 

	
 
	return true;
 
}
 

	
 
#define EXTR(p, q) (((uint16)(palette_animation_counter * (p)) * (q)) >> 16)
 
#define EXTR2(p, q) (((uint16)(~palette_animation_counter * (p)) * (q)) >> 16)
 

	
 
void DoPaletteAnimations()
 
{
 
	/* Animation counter for the palette animation. */
src/gfx_func.h
Show inline comments
 
@@ -118,12 +118,13 @@ Point GetCharPosInString(const char *str
 
const char *GetCharAtPosition(const char *str, int x, FontSize start_fontsize = FS_NORMAL);
 

	
 
void DrawDirtyBlocks();
 
void AddDirtyBlock(int left, int top, int right, int bottom);
 
void MarkWholeScreenDirty();
 

	
 
bool CopyPalette(Palette &local_palette, bool force_copy = false);
 
void GfxInitPalettes();
 
void CheckBlitter();
 

	
 
bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height);
 

	
 
/**
src/video/allegro_v.cpp
Show inline comments
 
@@ -40,12 +40,13 @@ static FVideoDriver_Allegro iFVideoDrive
 

	
 
static BITMAP *_allegro_screen;
 

	
 
#define MAX_DIRTY_RECTS 100
 
static PointDimension _dirty_rects[MAX_DIRTY_RECTS];
 
static int _num_dirty_rects;
 
static Palette _local_palette; ///< Current palette to use for drawing.
 

	
 
void VideoDriver_Allegro::MakeDirty(int left, int top, int width, int height)
 
{
 
	if (_num_dirty_rects < MAX_DIRTY_RECTS) {
 
		_dirty_rects[_num_dirty_rects].x = left;
 
		_dirty_rects[_num_dirty_rects].y = top;
 
@@ -77,15 +78,15 @@ void VideoDriver_Allegro::Paint()
 
static void UpdatePalette(uint start, uint count)
 
{
 
	static PALETTE pal;
 

	
 
	uint end = start + count;
 
	for (uint i = start; i != end; i++) {
 
		pal[i].r = _cur_palette.palette[i].r / 4;
 
		pal[i].g = _cur_palette.palette[i].g / 4;
 
		pal[i].b = _cur_palette.palette[i].b / 4;
 
		pal[i].r = _local_palette.palette[i].r / 4;
 
		pal[i].g = _local_palette.palette[i].g / 4;
 
		pal[i].b = _local_palette.palette[i].b / 4;
 
		pal[i].filler = 0;
 
	}
 

	
 
	set_palette_range(pal, start, end - 1, 1);
 
}
 

	
 
@@ -93,31 +94,30 @@ static void InitPalette()
 
{
 
	UpdatePalette(0, 256);
 
}
 

	
 
void VideoDriver_Allegro::CheckPaletteAnim()
 
{
 
	if (_cur_palette.count_dirty != 0) {
 
		Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 
	if (!CopyPalette(_local_palette)) return;
 

	
 
	Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 

	
 
		switch (blitter->UsePaletteAnimation()) {
 
			case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
				UpdatePalette(_cur_palette.first_dirty, _cur_palette.count_dirty);
 
				break;
 
	switch (blitter->UsePaletteAnimation()) {
 
		case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
			UpdatePalette(_local_palette.first_dirty, _local_palette.count_dirty);
 
			break;
 

	
 
			case Blitter::PALETTE_ANIMATION_BLITTER:
 
				blitter->PaletteAnimate(_cur_palette);
 
				break;
 
		case Blitter::PALETTE_ANIMATION_BLITTER:
 
			blitter->PaletteAnimate(_local_palette);
 
			break;
 

	
 
			case Blitter::PALETTE_ANIMATION_NONE:
 
				break;
 
		case Blitter::PALETTE_ANIMATION_NONE:
 
			break;
 

	
 
			default:
 
				NOT_REACHED();
 
		}
 
		_cur_palette.count_dirty = 0;
 
		default:
 
			NOT_REACHED();
 
	}
 
}
 

	
 
static const Dimension default_resolutions[] = {
 
	{ 640,  480},
 
	{ 800,  600},
src/video/cocoa/cocoa_ogl.mm
Show inline comments
 
@@ -34,12 +34,14 @@
 
#include "../opengl.h"
 

	
 
#import <dlfcn.h>
 
#import <OpenGL/OpenGL.h>
 
#import <OpenGL/gl3.h>
 

	
 
static Palette _local_palette; ///< Current palette to use for drawing.
 

	
 

	
 
/**
 
 * Important notice regarding all modifications!!!!!!!
 
 * There are certain limitations because the file is objective C++.
 
 * gdb has limitations.
 
 * C++ and objective C code can't be joined in all cases (classes stuff).
 
@@ -301,23 +303,21 @@ void VideoDriver_CocoaOpenGL::ReleaseVid
 
}
 

	
 
void VideoDriver_CocoaOpenGL::Paint()
 
{
 
	PerformanceMeasurer framerate(PFE_VIDEO);
 

	
 
	if (_cur_palette.count_dirty != 0) {
 
	if (CopyPalette(_local_palette)) {
 
		Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 

	
 
		/* Always push a changed palette to OpenGL. */
 
		CGLSetCurrentContext(this->gl_context);
 
		OpenGLBackend::Get()->UpdatePalette(_cur_palette.palette, _cur_palette.first_dirty, _cur_palette.count_dirty);
 
		OpenGLBackend::Get()->UpdatePalette(_local_palette.palette, _local_palette.first_dirty, _local_palette.count_dirty);
 
		if (blitter->UsePaletteAnimation() == Blitter::PALETTE_ANIMATION_BLITTER) {
 
			blitter->PaletteAnimate(_cur_palette);
 
			blitter->PaletteAnimate(_local_palette);
 
		}
 

	
 
		_cur_palette.count_dirty = 0;
 
	}
 

	
 
	[ CATransaction begin ];
 
	[ this->cocoaview.subviews[0].layer setNeedsDisplay ];
 
	[ CATransaction commit ];
 
}
src/video/cocoa/cocoa_v.mm
Show inline comments
 
@@ -69,12 +69,13 @@
 
 * set this to 0. */
 
#ifndef kCGBitmapByteOrder32Host
 
#define kCGBitmapByteOrder32Host 0
 
#endif
 

	
 
bool _cocoa_video_started = false;
 
static Palette _local_palette; ///< Current palette to use for drawing.
 

	
 
extern bool _tab_is_down;
 

	
 

	
 
/** List of common display/window sizes. */
 
static const Dimension _default_resolutions[] = {
 
@@ -711,42 +712,41 @@ void VideoDriver_CocoaQuartz::BlitIndexe
 
void VideoDriver_CocoaQuartz::UpdatePalette(uint first_color, uint num_colors)
 
{
 
	if (this->buffer_depth != 8) return;
 

	
 
	for (uint i = first_color; i < first_color + num_colors; i++) {
 
		uint32 clr = 0xff000000;
 
		clr |= (uint32)_cur_palette.palette[i].r << 16;
 
		clr |= (uint32)_cur_palette.palette[i].g << 8;
 
		clr |= (uint32)_cur_palette.palette[i].b;
 
		clr |= (uint32)_local_palette.palette[i].r << 16;
 
		clr |= (uint32)_local_palette.palette[i].g << 8;
 
		clr |= (uint32)_local_palette.palette[i].b;
 
		this->palette[i] = clr;
 
	}
 

	
 
	this->MakeDirty(0, 0, _screen.width, _screen.height);
 
}
 

	
 
void VideoDriver_CocoaQuartz::CheckPaletteAnim()
 
{
 
	if (_cur_palette.count_dirty != 0) {
 
		Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 
	if (!CopyPalette(_local_palette)) return;
 

	
 
	Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 

	
 
		switch (blitter->UsePaletteAnimation()) {
 
			case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
				this->UpdatePalette(_cur_palette.first_dirty, _cur_palette.count_dirty);
 
				break;
 
	switch (blitter->UsePaletteAnimation()) {
 
		case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
			this->UpdatePalette(_local_palette.first_dirty, _local_palette.count_dirty);
 
			break;
 

	
 
			case Blitter::PALETTE_ANIMATION_BLITTER:
 
				blitter->PaletteAnimate(_cur_palette);
 
				break;
 
		case Blitter::PALETTE_ANIMATION_BLITTER:
 
			blitter->PaletteAnimate(_local_palette);
 
			break;
 

	
 
			case Blitter::PALETTE_ANIMATION_NONE:
 
				break;
 
		case Blitter::PALETTE_ANIMATION_NONE:
 
			break;
 

	
 
			default:
 
				NOT_REACHED();
 
		}
 
		_cur_palette.count_dirty = 0;
 
		default:
 
			NOT_REACHED();
 
	}
 
}
 

	
 
/** Draw window */
 
void VideoDriver_CocoaQuartz::Paint()
 
{
src/video/sdl2_default_v.cpp
Show inline comments
 
@@ -59,15 +59,13 @@ void VideoDriver_SDL_Default::MakePalett
 
{
 
	if (_sdl_palette == nullptr) {
 
		_sdl_palette = SDL_AllocPalette(256);
 
		if (_sdl_palette == nullptr) usererror("SDL2: Couldn't allocate palette: %s", SDL_GetError());
 
	}
 

	
 
	_cur_palette.first_dirty = 0;
 
	_cur_palette.count_dirty = 256;
 
	this->local_palette = _cur_palette;
 
	CopyPalette(this->local_palette, true);
 
	this->UpdatePalette();
 

	
 
	if (_sdl_surface != _sdl_real_surface) {
 
		/* When using a shadow surface, also set our palette on the real screen. This lets SDL
 
		 * allocate as many colors (or approximations) as
 
		 * possible, instead of using only the default SDL
 
@@ -93,15 +91,15 @@ void VideoDriver_SDL_Default::MakePalett
 
}
 

	
 
void VideoDriver_SDL_Default::Paint()
 
{
 
	PerformanceMeasurer framerate(PFE_VIDEO);
 

	
 
	if (IsEmptyRect(this->dirty_rect) && _cur_palette.count_dirty == 0) return;
 
	if (IsEmptyRect(this->dirty_rect) && this->local_palette.count_dirty == 0) return;
 

	
 
	if (_cur_palette.count_dirty != 0) {
 
	if (this->local_palette.count_dirty != 0) {
 
		Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 

	
 
		switch (blitter->UsePaletteAnimation()) {
 
			case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
				this->UpdatePalette();
 
				break;
 
@@ -114,13 +112,13 @@ void VideoDriver_SDL_Default::Paint()
 
			case Blitter::PALETTE_ANIMATION_NONE:
 
				break;
 

	
 
			default:
 
				NOT_REACHED();
 
		}
 
		_cur_palette.count_dirty = 0;
 
		this->local_palette.count_dirty = 0;
 
	}
 

	
 
	SDL_Rect r = { this->dirty_rect.left, this->dirty_rect.top, this->dirty_rect.right - this->dirty_rect.left, this->dirty_rect.bottom - this->dirty_rect.top };
 

	
 
	if (_sdl_surface != _sdl_real_surface) {
 
		SDL_BlitSurface(_sdl_surface, &r, _sdl_real_surface, &r);
src/video/sdl2_opengl_v.cpp
Show inline comments
 
@@ -143,15 +143,13 @@ bool VideoDriver_SDL_OpenGL::AllocateBac
 
	MemSetT(&this->dirty_rect, 0);
 

	
 
	bool res = OpenGLBackend::Get()->Resize(w, h, force);
 
	SDL_GL_SwapWindow(this->sdl_window);
 
	_screen.dst_ptr = this->GetVideoPointer();
 

	
 
	_cur_palette.first_dirty = 0;
 
	_cur_palette.count_dirty = 256;
 
	this->local_palette = _cur_palette;
 
	CopyPalette(this->local_palette, true);
 

	
 
	return res;
 
}
 

	
 
void *VideoDriver_SDL_OpenGL::GetVideoPointer()
 
{
 
@@ -170,22 +168,22 @@ void VideoDriver_SDL_OpenGL::ReleaseVide
 
}
 

	
 
void VideoDriver_SDL_OpenGL::Paint()
 
{
 
	PerformanceMeasurer framerate(PFE_VIDEO);
 

	
 
	if (_cur_palette.count_dirty != 0) {
 
	if (this->local_palette.count_dirty != 0) {
 
		Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 

	
 
		/* Always push a changed palette to OpenGL. */
 
		OpenGLBackend::Get()->UpdatePalette(this->local_palette.palette, this->local_palette.first_dirty, this->local_palette.count_dirty);
 
		if (blitter->UsePaletteAnimation() == Blitter::PALETTE_ANIMATION_BLITTER) {
 
			blitter->PaletteAnimate(this->local_palette);
 
		}
 

	
 
		_cur_palette.count_dirty = 0;
 
		this->local_palette.count_dirty = 0;
 
	}
 

	
 
	OpenGLBackend::Get()->Paint();
 
	OpenGLBackend::Get()->DrawMouseCursor();
 

	
 
	SDL_GL_SwapWindow(this->sdl_window);
src/video/sdl2_v.cpp
Show inline comments
 
@@ -40,15 +40,13 @@ void VideoDriver_SDL_Base::MakeDirty(int
 
	Rect r = {left, top, left + width, top + height};
 
	this->dirty_rect = BoundingRect(this->dirty_rect, r);
 
}
 

	
 
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);
 
}
 

	
 
static const Dimension default_resolutions[] = {
 
	{  640,  480 },
 
	{  800,  600 },
 
@@ -128,16 +126,13 @@ static uint FindStartupDisplay(uint star
 
}
 

	
 
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();
 

	
 
		GameSizeChanged();
 
	}
 
}
src/video/sdl2_v.h
Show inline comments
 
@@ -42,13 +42,13 @@ public:
 
	std::vector<int> GetListOfMonitorRefreshRates() override;
 

	
 
	const char *GetName() const override { return "sdl"; }
 

	
 
protected:
 
	struct SDL_Window *sdl_window; ///< Main SDL window.
 
	Palette local_palette; ///< Copy of _cur_palette.
 
	Palette local_palette; ///< Current palette to use for drawing.
 
	bool buffer_locked; ///< Video buffer was locked by the main thread.
 
	Rect dirty_rect; ///< Rectangle encompassing the dirty area of the video buffer.
 

	
 
	Dimension GetScreenSize() const override;
 
	void InputLoop() override;
 
	bool LockVideoBuffer() override;
src/video/sdl_v.cpp
Show inline comments
 
@@ -103,41 +103,36 @@ static void UpdatePalette(bool init = fa
 
		SDL_UpdateRect(_sdl_realscreen, 0, 0, 0, 0);
 
	}
 
}
 

	
 
static void InitPalette()
 
{
 
	_local_palette = _cur_palette;
 
	_local_palette.first_dirty = 0;
 
	_local_palette.count_dirty = 256;
 
	CopyPalette(_local_palette, true);
 
	UpdatePalette(true);
 
}
 

	
 
void VideoDriver_SDL::CheckPaletteAnim()
 
{
 
	_local_palette = _cur_palette;
 
	if (!CopyPalette(_local_palette)) return;
 

	
 
	if (_cur_palette.count_dirty != 0) {
 
		Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 
	Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 

	
 
		switch (blitter->UsePaletteAnimation()) {
 
			case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
				UpdatePalette();
 
				break;
 
	switch (blitter->UsePaletteAnimation()) {
 
		case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
			UpdatePalette();
 
			break;
 

	
 
			case Blitter::PALETTE_ANIMATION_BLITTER:
 
				blitter->PaletteAnimate(_local_palette);
 
				break;
 
		case Blitter::PALETTE_ANIMATION_BLITTER:
 
			blitter->PaletteAnimate(_local_palette);
 
			break;
 

	
 
			case Blitter::PALETTE_ANIMATION_NONE:
 
				break;
 
		case Blitter::PALETTE_ANIMATION_NONE:
 
			break;
 

	
 
			default:
 
				NOT_REACHED();
 
		}
 
		_cur_palette.count_dirty = 0;
 
		default:
 
			NOT_REACHED();
 
	}
 
}
 

	
 
void VideoDriver_SDL::Paint()
 
{
 
	PerformanceMeasurer framerate(PFE_VIDEO);
src/video/win32_v.cpp
Show inline comments
 
@@ -39,14 +39,13 @@
 
#endif
 

	
 
bool _window_maximize;
 
static Dimension _bck_resolution;
 
DWORD _imm_props;
 

	
 
/** Local copy of the palette for use in the drawing thread. */
 
static Palette _local_palette;
 
static Palette _local_palette; ///< Current palette to use for drawing.
 

	
 
bool VideoDriver_Win32Base::ClaimMousePointer()
 
{
 
	MyShowCursor(false, true);
 
	return true;
 
}
 
@@ -809,15 +808,13 @@ void VideoDriver_Win32Base::MakeDirty(in
 
	Rect r = {left, top, left + width, top + height};
 
	this->dirty_rect = BoundingRect(this->dirty_rect, r);
 
}
 

	
 
void VideoDriver_Win32Base::CheckPaletteAnim()
 
{
 
	if (_cur_palette.count_dirty == 0) return;
 

	
 
	_local_palette = _cur_palette;
 
	if (!CopyPalette(_local_palette)) return;
 
	this->MakeDirty(0, 0, _screen.width, _screen.height);
 
}
 

	
 
void VideoDriver_Win32Base::InputLoop()
 
{
 
	bool old_ctrl_pressed = _ctrl_pressed;
 
@@ -875,16 +872,13 @@ void VideoDriver_Win32Base::MainLoop()
 
}
 

	
 
void VideoDriver_Win32Base::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;
 
		_local_palette = _cur_palette;
 
		CopyPalette(_local_palette, true);
 

	
 
		BlitterFactory::GetCurrentBlitter()->PostResize();
 

	
 
		GameSizeChanged();
 
	}
 
}
 
@@ -1075,15 +1069,13 @@ bool VideoDriver_Win32GDI::AfterBlitterC
 
	assert(BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 0);
 
	return this->AllocateBackingStore(_screen.width, _screen.height, true) && this->MakeWindow(_fullscreen, false);
 
}
 

	
 
void VideoDriver_Win32GDI::MakePalette()
 
{
 
	_cur_palette.first_dirty = 0;
 
	_cur_palette.count_dirty = 256;
 
	_local_palette = _cur_palette;
 
	CopyPalette(_local_palette, true);
 

	
 
	LOGPALETTE *pal = (LOGPALETTE*)alloca(sizeof(LOGPALETTE) + (256 - 1) * sizeof(PALETTEENTRY));
 

	
 
	pal->palVersion = 0x300;
 
	pal->palNumEntries = 256;
 

	
 
@@ -1132,13 +1124,13 @@ void VideoDriver_Win32GDI::Paint()
 
	HDC dc = GetDC(this->main_wnd);
 
	HDC dc2 = CreateCompatibleDC(dc);
 

	
 
	HBITMAP old_bmp = (HBITMAP)SelectObject(dc2, this->dib_sect);
 
	HPALETTE old_palette = SelectPalette(dc, this->gdi_palette, FALSE);
 

	
 
	if (_cur_palette.count_dirty != 0) {
 
	if (_local_palette.count_dirty != 0) {
 
		Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 

	
 
		switch (blitter->UsePaletteAnimation()) {
 
			case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
				this->UpdatePalette(dc2, _local_palette.first_dirty, _local_palette.count_dirty);
 
				break;
 
@@ -1151,13 +1143,13 @@ void VideoDriver_Win32GDI::Paint()
 
			case Blitter::PALETTE_ANIMATION_NONE:
 
				break;
 

	
 
			default:
 
				NOT_REACHED();
 
		}
 
		_cur_palette.count_dirty = 0;
 
		_local_palette.count_dirty = 0;
 
	}
 

	
 
	BitBlt(dc, 0, 0, this->width, this->height, dc2, 0, 0, SRCCOPY);
 
	SelectPalette(dc, old_palette, TRUE);
 
	SelectObject(dc2, old_bmp);
 
	DeleteDC(dc2);
 
@@ -1471,22 +1463,22 @@ void VideoDriver_Win32OpenGL::ReleaseVid
 
}
 

	
 
void VideoDriver_Win32OpenGL::Paint()
 
{
 
	PerformanceMeasurer framerate(PFE_VIDEO);
 

	
 
	if (_cur_palette.count_dirty != 0) {
 
	if (_local_palette.count_dirty != 0) {
 
		Blitter *blitter = BlitterFactory::GetCurrentBlitter();
 

	
 
		/* Always push a changed palette to OpenGL. */
 
		OpenGLBackend::Get()->UpdatePalette(_local_palette.palette, _local_palette.first_dirty, _local_palette.count_dirty);
 
		if (blitter->UsePaletteAnimation() == Blitter::PALETTE_ANIMATION_BLITTER) {
 
			blitter->PaletteAnimate(_local_palette);
 
		}
 

	
 
		_cur_palette.count_dirty = 0;
 
		_local_palette.count_dirty = 0;
 
	}
 

	
 
	OpenGLBackend::Get()->Paint();
 
	OpenGLBackend::Get()->DrawMouseCursor();
 

	
 
	SwapBuffers(this->dc);
0 comments (0 inline, 0 general)