diff options
author | frosch <frosch@openttd.org> | 2009-12-19 18:46:40 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-12-19 18:46:40 +0000 |
commit | 29d6491605bb13e7a751b2a1a8b8728f17bbc54b (patch) | |
tree | d36add5885667a83011cef1fdbfe90d5ce548dfd /src/video/cocoa | |
parent | 7572f95448308fd19cd91ea1416ddf6320f51247 (diff) | |
download | openttd-29d6491605bb13e7a751b2a1a8b8728f17bbc54b.tar.xz |
(svn r18545) -Fix [FS#3292]: Assign '_screen.dst_ptr' as soon as it is allocated.
Diffstat (limited to 'src/video/cocoa')
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 1 | ||||
-rw-r--r-- | src/video/cocoa/event.mm | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 530e1ddb1..0a0834686 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -194,6 +194,7 @@ void QZ_GameSizeChanged() _screen.width = _cocoa_subdriver->GetWidth(); _screen.height = _cocoa_subdriver->GetHeight(); _screen.pitch = _cocoa_subdriver->GetWidth(); + _screen.dst_ptr = _cocoa_subdriver->GetPixelBuffer(); _fullscreen = _cocoa_subdriver->IsFullscreen(); GameSizeChanged(); diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm index fef866f53..284be0657 100644 --- a/src/video/cocoa/event.mm +++ b/src/video/cocoa/event.mm @@ -603,7 +603,6 @@ void QZ_GameLoop() uint32 st = 0; #endif - _screen.dst_ptr = _cocoa_subdriver->GetPixelBuffer(); DisplaySplashImage(); QZ_CheckPaletteAnim(); _cocoa_subdriver->Draw(true); @@ -611,7 +610,6 @@ void QZ_GameLoop() for (int i = 0; i < 2; i++) GameLoop(); - _screen.dst_ptr = _cocoa_subdriver->GetPixelBuffer(); UpdateWindows(); QZ_CheckPaletteAnim(); _cocoa_subdriver->Draw(); @@ -651,7 +649,6 @@ void QZ_GameLoop() GameLoop(); - _screen.dst_ptr = _cocoa_subdriver->GetPixelBuffer(); UpdateWindows(); if (++pal_tick > 4) { QZ_CheckPaletteAnim(); @@ -666,7 +663,6 @@ void QZ_GameLoop() #ifdef _DEBUG st += GetTick() - st0; #endif - _screen.dst_ptr = _cocoa_subdriver->GetPixelBuffer(); NetworkDrawChatMessage(); DrawMouseCursor(); _cocoa_subdriver->Draw(); |