|
|
@ -1464,20 +1464,24 @@ static void QZ_DrawScreen(void)
|
|
|
|
uint width;
|
|
|
|
uint width;
|
|
|
|
uint pitch;
|
|
|
|
uint pitch;
|
|
|
|
uint y;
|
|
|
|
uint y;
|
|
|
|
uint num_dirty_rects;
|
|
|
|
|
|
|
|
uint length_drawn;
|
|
|
|
|
|
|
|
uint left;
|
|
|
|
|
|
|
|
uint i;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src = _cocoa_video_data.pixels;
|
|
|
|
src = _cocoa_video_data.pixels;
|
|
|
|
dst = (uint8*)_cocoa_video_data.realpixels;
|
|
|
|
dst = (uint8*)_cocoa_video_data.realpixels;
|
|
|
|
height = _cocoa_video_data.height;
|
|
|
|
|
|
|
|
width = _cocoa_video_data.width;
|
|
|
|
width = _cocoa_video_data.width;
|
|
|
|
pitch = _cocoa_video_data.pitch;
|
|
|
|
pitch = _cocoa_video_data.pitch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __POWERPC__
|
|
|
|
|
|
|
|
// PPC appears to handle updating of rectangles right
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint num_dirty_rects;
|
|
|
|
|
|
|
|
uint length_drawn;
|
|
|
|
|
|
|
|
uint left;
|
|
|
|
|
|
|
|
uint i;
|
|
|
|
|
|
|
|
|
|
|
|
num_dirty_rects = _cocoa_video_data.num_dirty_rects;
|
|
|
|
num_dirty_rects = _cocoa_video_data.num_dirty_rects;
|
|
|
|
|
|
|
|
|
|
|
|
/* Check if we need to do anything */
|
|
|
|
/* Check if we need to do anything */
|
|
|
|
if (_cocoa_video_data.num_dirty_rects == 0 ) return;
|
|
|
|
if (num_dirty_rects == 0 ) return;
|
|
|
|
|
|
|
|
|
|
|
|
if (num_dirty_rects >= MAX_DIRTY_RECTS) {
|
|
|
|
if (num_dirty_rects >= MAX_DIRTY_RECTS) {
|
|
|
|
num_dirty_rects = 1;
|
|
|
|
num_dirty_rects = 1;
|
|
|
@ -1500,6 +1504,15 @@ static void QZ_DrawScreen(void)
|
|
|
|
|
|
|
|
|
|
|
|
_cocoa_video_data.num_dirty_rects = 0;
|
|
|
|
_cocoa_video_data.num_dirty_rects = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
// it appears that Intel based macs didn't like to only update parts of the screen at a time, so they still update everything at each frame
|
|
|
|
|
|
|
|
// we need to switch to use Quartz exclusively (no QuickDraw commands at all) to fix this
|
|
|
|
|
|
|
|
// to use Quartz exclusively, we should use 16 or 32 bit graphics since 8 bit coloured graphic support sucks
|
|
|
|
|
|
|
|
height = _cocoa_video_data.height;
|
|
|
|
|
|
|
|
QZ_WaitForVerticalBlank();
|
|
|
|
|
|
|
|
for (y = 0; y < height; y++) memcpy(dst + y * pitch, src + y * width, width);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int QZ_ListFullscreenModes(OTTDPoint* mode_list, int max_modes)
|
|
|
|
static int QZ_ListFullscreenModes(OTTDPoint* mode_list, int max_modes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|