summaryrefslogtreecommitdiff
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
commitee4208ffe9769ea4308f39b68c811e1271133caa (patch)
tree1c46e642a8f233e49a53bac11bd3c5259bfcb767
parent12be876131ad76d0fb8e7d0fbff586ea1a0a693e (diff)
downloadopenttd-ee4208ffe9769ea4308f39b68c811e1271133caa.tar.xz
(svn r10123) -Fix r10121: the 8 bpp cocoa video driver works again
-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();