summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-06-12 23:06:56 +0000
committerbjarni <bjarni@openttd.org>2007-06-12 23:06:56 +0000
commit5d013d166e4ba6a4c77e7c4e8cb61b7ffdd2e294 (patch)
tree1c46e642a8f233e49a53bac11bd3c5259bfcb767 /src
parentf8ae742da455067385b1255d9b605087b2141295 (diff)
downloadopenttd-5d013d166e4ba6a4c77e7c4e8cb61b7ffdd2e294.tar.xz
(svn r10123) -Fix r10121: the 8 bpp cocoa video driver works again
Diffstat (limited to 'src')
-rw-r--r--src/video/cocoa_v.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video/cocoa_v.mm b/src/video/cocoa_v.mm
index 7c563d281..2adc231d5 100644
--- a/src/video/cocoa_v.mm
+++ b/src/video/cocoa_v.mm
@@ -72,6 +72,8 @@ extern "C" void HideMenuBar();
#include "../blitter/blitter.hpp"
#include "cocoa_v.h"
#include "cocoa_keys.h"
+#include "../blitter/blitter.hpp"
+#include "../renderer/renderer.hpp"
#undef Point
#undef Rect
@@ -871,6 +873,9 @@ static void QZ_SetPortAlphaOpaque()
_screen.width = _cocoa_video_data.width;
_screen.height = _cocoa_video_data.height;
_screen.pitch = _cocoa_video_data.width;
+ _screen.renderer = RendererFactoryBase::SelectRenderer(BlitterFactoryBase::GetCurrentBlitter()->GetRenderer());
+
+ if (_screen.renderer == NULL) error("Couldn't load the renderer '%s' the selected blitter depends on", BlitterFactoryBase::GetCurrentBlitter()->GetRenderer());
GameSizeChanged();
@@ -1706,6 +1711,9 @@ static const char* QZ_SetVideoMode(uint width, uint height, bool fullscreen)
_screen.width = _cocoa_video_data.width;
_screen.height = _cocoa_video_data.height;
_screen.pitch = _cocoa_video_data.width;
+ _screen.renderer = RendererFactoryBase::SelectRenderer(BlitterFactoryBase::GetCurrentBlitter()->GetRenderer());
+
+ if (_screen.renderer == NULL) error("Couldn't load the renderer '%s' the selected blitter depends on", BlitterFactoryBase::GetCurrentBlitter()->GetRenderer());
QZ_UpdateVideoModes();
GameSizeChanged();