1
0
Fork 0

(svn r17793) -Fix: [OSX] The splash image wasn't displayed if the Quartz video driver was used.

release/1.0
michi_cc 2009-10-17 22:36:39 +00:00
parent c850647e3a
commit 144febd2d9
5 changed files with 11 additions and 9 deletions

View File

@ -47,7 +47,7 @@ class CocoaSubdriver {
public: public:
virtual ~CocoaSubdriver() {} virtual ~CocoaSubdriver() {}
virtual void Draw() = 0; virtual void Draw(bool force_update = false) = 0;
virtual void MakeDirty(int left, int top, int width, int height) = 0; virtual void MakeDirty(int left, int top, int width, int height) = 0;
virtual void UpdatePalette(uint first_color, uint num_colors) = 0; virtual void UpdatePalette(uint first_color, uint num_colors) = 0;

View File

@ -606,7 +606,7 @@ void QZ_GameLoop()
_screen.dst_ptr = _cocoa_subdriver->GetPixelBuffer(); _screen.dst_ptr = _cocoa_subdriver->GetPixelBuffer();
DisplaySplashImage(); DisplaySplashImage();
QZ_CheckPaletteAnim(); QZ_CheckPaletteAnim();
_cocoa_subdriver->Draw(); _cocoa_subdriver->Draw(true);
CSleep(1); CSleep(1);
for (int i = 0; i < 2; i++) GameLoop(); for (int i = 0; i < 2; i++) GameLoop();

View File

@ -420,7 +420,7 @@ public:
this->RestoreVideoMode(); this->RestoreVideoMode();
} }
virtual void Draw() virtual void Draw(bool force_update)
{ {
const uint8 *src = (uint8 *)this->pixel_buffer; const uint8 *src = (uint8 *)this->pixel_buffer;
uint8 *dst = (uint8 *)this->screen_buffer; uint8 *dst = (uint8 *)this->screen_buffer;

View File

@ -129,7 +129,7 @@ public:
WindowQuartzSubdriver(int bpp); WindowQuartzSubdriver(int bpp);
virtual ~WindowQuartzSubdriver(); virtual ~WindowQuartzSubdriver();
virtual void Draw(); virtual void Draw(bool force_update);
virtual void MakeDirty(int left, int top, int width, int height); virtual void MakeDirty(int left, int top, int width, int height);
virtual void UpdatePalette(uint first_color, uint num_colors); virtual void UpdatePalette(uint first_color, uint num_colors);
@ -552,7 +552,7 @@ WindowQuartzSubdriver::~WindowQuartzSubdriver()
free(this->pixel_buffer); free(this->pixel_buffer);
} }
void WindowQuartzSubdriver::Draw() void WindowQuartzSubdriver::Draw(bool force_update)
{ {
/* Check if we need to do anything */ /* Check if we need to do anything */
if (this->num_dirty_rects == 0 || [ this->window isMiniaturized ]) return; if (this->num_dirty_rects == 0 || [ this->window isMiniaturized ]) return;
@ -583,8 +583,10 @@ void WindowQuartzSubdriver::Draw()
dirtyrect.size.width = this->dirty_rects[i].right - this->dirty_rects[i].left; dirtyrect.size.width = this->dirty_rects[i].right - this->dirty_rects[i].left;
dirtyrect.size.height = this->dirty_rects[i].bottom - this->dirty_rects[i].top; dirtyrect.size.height = this->dirty_rects[i].bottom - this->dirty_rects[i].top;
/* drawRect will be automatically called by Mac OS X during next update cycle, and then blitting will occur */ /* Normally drawRect will be automatically called by Mac OS X during next update cycle,
[ qzview setNeedsDisplayInRect:dirtyrect ]; * and then blitting will occur. If force_update is true, it will be done right now. */
[ this->qzview setNeedsDisplayInRect:dirtyrect ];
if (force_update) [ this->qzview displayIfNeeded ];
} }
//DrawResizeIcon(); //DrawResizeIcon();

View File

@ -144,7 +144,7 @@ public:
WindowQuickdrawSubdriver(int bpp); WindowQuickdrawSubdriver(int bpp);
virtual ~WindowQuickdrawSubdriver(); virtual ~WindowQuickdrawSubdriver();
virtual void Draw(); virtual void Draw(bool force_update);
virtual void MakeDirty(int left, int top, int width, int height); virtual void MakeDirty(int left, int top, int width, int height);
virtual void UpdatePalette(uint first_color, uint num_colors); virtual void UpdatePalette(uint first_color, uint num_colors);
@ -547,7 +547,7 @@ WindowQuickdrawSubdriver::~WindowQuickdrawSubdriver()
free(this->pixel_buffer); free(this->pixel_buffer);
} }
void WindowQuickdrawSubdriver::Draw() void WindowQuickdrawSubdriver::Draw(bool force_update)
{ {
/* Check if we need to do anything */ /* Check if we need to do anything */
if (this->num_dirty_rects == 0 || [ this->window isMiniaturized ]) return; if (this->num_dirty_rects == 0 || [ this->window isMiniaturized ]) return;