summaryrefslogtreecommitdiff
path: root/src/video/cocoa/wnd_quartz.mm
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2009-10-17 22:36:39 +0000
committermichi_cc <michi_cc@openttd.org>2009-10-17 22:36:39 +0000
commit144febd2d9255726408d3e0ae32ed3284a54b09f (patch)
treea5a25512f52549c1ca9432da478b2aecbfc0039b /src/video/cocoa/wnd_quartz.mm
parentc850647e3aa9dc0408056c4b01d138fdd140e872 (diff)
downloadopenttd-144febd2d9255726408d3e0ae32ed3284a54b09f.tar.xz
(svn r17793) -Fix: [OSX] The splash image wasn't displayed if the Quartz video driver was used.
Diffstat (limited to 'src/video/cocoa/wnd_quartz.mm')
-rw-r--r--src/video/cocoa/wnd_quartz.mm10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm
index 9d3201f08..d99a1877b 100644
--- a/src/video/cocoa/wnd_quartz.mm
+++ b/src/video/cocoa/wnd_quartz.mm
@@ -129,7 +129,7 @@ public:
WindowQuartzSubdriver(int bpp);
virtual ~WindowQuartzSubdriver();
- virtual void Draw();
+ virtual void Draw(bool force_update);
virtual void MakeDirty(int left, int top, int width, int height);
virtual void UpdatePalette(uint first_color, uint num_colors);
@@ -552,7 +552,7 @@ WindowQuartzSubdriver::~WindowQuartzSubdriver()
free(this->pixel_buffer);
}
-void WindowQuartzSubdriver::Draw()
+void WindowQuartzSubdriver::Draw(bool force_update)
{
/* Check if we need to do anything */
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.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 */
- [ qzview setNeedsDisplayInRect:dirtyrect ];
+ /* Normally drawRect will be automatically called by Mac OS X during next update cycle,
+ * 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();