summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-03-18 16:11:29 +0000
committerbjarni <bjarni@openttd.org>2006-03-18 16:11:29 +0000
commit31e1c4fe49013d9609244ba2728f4cda4b1b8c75 (patch)
treea32cc21f7c444e9c284b22893656d72ed2ea2213 /video
parent5affa778223ff817634dafd97cc8261ac31de7ec (diff)
downloadopenttd-31e1c4fe49013d9609244ba2728f4cda4b1b8c75.tar.xz
(svn r3971) reverted r3742 as those new errors were not the right way to handle those exceptions
Diffstat (limited to 'video')
-rw-r--r--video/cocoa_v.m12
1 files changed, 1 insertions, 11 deletions
diff --git a/video/cocoa_v.m b/video/cocoa_v.m
index e8c18895c..71065cd25 100644
--- a/video/cocoa_v.m
+++ b/video/cocoa_v.m
@@ -847,10 +847,6 @@ static void QZ_SetPortAlphaOpaque(void)
_cocoa_video_data.realpixels = GetPixBaseAddr(GetPortPixMap(thePort));
_cocoa_video_data.pitch = GetPixRowBytes(GetPortPixMap(thePort));
- if (_cocoa_video_data.realpixels == NULL) {
- ShowMacErrorDialog("Error: failure to locate screen buffer in the OS");
- }
-
/* _cocoa_video_data.realpixels now points to the window's pixels
* We want it to point to the *view's* pixels
*/
@@ -866,9 +862,7 @@ static void QZ_SetPortAlphaOpaque(void)
/* Allocate new buffer */
free(_cocoa_video_data.pixels);
_cocoa_video_data.pixels = (uint8*)malloc(newViewFrame.size.width * newViewFrame.size.height);
- if (_cocoa_video_data.pixels == NULL) {
- ShowMacErrorDialog("Error: failed to allocate frame buffer");
- }
+ assert(_cocoa_video_data.pixels != NULL);
/* Tell the game that the resolution changed */
@@ -1358,10 +1352,6 @@ static const char* QZ_SetVideoFullScreen(int width, int height)
_cocoa_video_data.realpixels = (uint8*)CGDisplayBaseAddress(_cocoa_video_data.display_id);
_cocoa_video_data.pitch = CGDisplayBytesPerRow(_cocoa_video_data.display_id);
- if (_cocoa_video_data.realpixels == NULL ) {
- ShowMacErrorDialog("Error: failure to locate screen buffer in the OS for full screen mode");
- }
-
_cocoa_video_data.width = CGDisplayPixelsWide(_cocoa_video_data.display_id);
_cocoa_video_data.height = CGDisplayPixelsHigh(_cocoa_video_data.display_id);
_cocoa_video_data.fullscreen = true;