mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-01 20:03:26 +00:00
(svn r10123) -Fix r10121: the 8 bpp cocoa video driver works again
This commit is contained in:
parent
12be876131
commit
ee4208ffe9
@ -72,6 +72,8 @@ extern "C" void HideMenuBar();
|
|||||||
#include "../blitter/blitter.hpp"
|
#include "../blitter/blitter.hpp"
|
||||||
#include "cocoa_v.h"
|
#include "cocoa_v.h"
|
||||||
#include "cocoa_keys.h"
|
#include "cocoa_keys.h"
|
||||||
|
#include "../blitter/blitter.hpp"
|
||||||
|
#include "../renderer/renderer.hpp"
|
||||||
|
|
||||||
#undef Point
|
#undef Point
|
||||||
#undef Rect
|
#undef Rect
|
||||||
@ -871,6 +873,9 @@ static void QZ_SetPortAlphaOpaque()
|
|||||||
_screen.width = _cocoa_video_data.width;
|
_screen.width = _cocoa_video_data.width;
|
||||||
_screen.height = _cocoa_video_data.height;
|
_screen.height = _cocoa_video_data.height;
|
||||||
_screen.pitch = _cocoa_video_data.width;
|
_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();
|
GameSizeChanged();
|
||||||
|
|
||||||
@ -1706,6 +1711,9 @@ static const char* QZ_SetVideoMode(uint width, uint height, bool fullscreen)
|
|||||||
_screen.width = _cocoa_video_data.width;
|
_screen.width = _cocoa_video_data.width;
|
||||||
_screen.height = _cocoa_video_data.height;
|
_screen.height = _cocoa_video_data.height;
|
||||||
_screen.pitch = _cocoa_video_data.width;
|
_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();
|
QZ_UpdateVideoModes();
|
||||||
GameSizeChanged();
|
GameSizeChanged();
|
||||||
|
Loading…
Reference in New Issue
Block a user