summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-03-24 09:47:50 +0000
committerbjarni <bjarni@openttd.org>2006-03-24 09:47:50 +0000
commitb8037ceb8363ed856800e30db4ce29594eff83e5 (patch)
tree2c9d744243f232a22401fb1668a40c63d80f894b
parent9be713f1ae0cff0bc06bbef395fda8bf829e38c2 (diff)
downloadopenttd-b8037ceb8363ed856800e30db4ce29594eff83e5.tar.xz
(svn r4082) -Fix: [OSX] FS#80 Crash when switching from windowed to fullscreen
this bug was introduced in rev 3670, but when undetected for a long time since it was resolution specific this is likely the issue with x86 OSX in fullscreen, so I removed the really slow workaround and will clean it up once I get positive feedback from a x86 mac this means that x86 OSX should now get the 1000% video driver speed boost as well this fix is written by eglandil
-rw-r--r--video/cocoa_v.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/video/cocoa_v.m b/video/cocoa_v.m
index 71065cd25..a3f3ed055 100644
--- a/video/cocoa_v.m
+++ b/video/cocoa_v.m
@@ -1470,7 +1470,7 @@ static void QZ_DrawScreen(void)
width = _cocoa_video_data.width;
pitch = _cocoa_video_data.pitch;
-#ifdef __POWERPC__
+#if 1
// PPC appears to handle updating of rectangles right
{
uint num_dirty_rects;
@@ -1497,9 +1497,9 @@ static void QZ_DrawScreen(void)
y = _cocoa_video_data.dirty_rects[i].top;
left = _cocoa_video_data.dirty_rects[i].left;
- length_drawn = _cocoa_video_data.dirty_rects[i].right - left + 1;
+ length_drawn = _cocoa_video_data.dirty_rects[i].right - left;
height = _cocoa_video_data.dirty_rects[i].bottom;
- for (; y <= height; y++) memcpy(dst + y * pitch + left, src + y * width +left, length_drawn);
+ for (; y < height; y++) memcpy(dst + y * pitch + left, src + y * width +left, length_drawn);
}
_cocoa_video_data.num_dirty_rects = 0;
@@ -1649,8 +1649,8 @@ static void QZ_UpdateVideoModes(void)
for (i = 0, j = 0; j < lengthof(_resolutions) && i < count; i++) {
if (_cocoa_video_data.fullscreen || (
- (uint)current_modes[i].x <= _cocoa_video_data.device_width &&
- (uint)current_modes[i].y <= _cocoa_video_data.device_height)
+ (uint)current_modes[i].x < _cocoa_video_data.device_width &&
+ (uint)current_modes[i].y < _cocoa_video_data.device_height)
) {
_resolutions[j][0] = current_modes[i].x;
_resolutions[j][1] = current_modes[i].y;