Replace Bitu with size_t when drawing surface
This commit is contained in:
parent
7198ea306c
commit
3680049510
1 changed files with 7 additions and 4 deletions
|
@ -1613,12 +1613,13 @@ void GFX_EndUpdate( const Bit16u *changedLines ) {
|
|||
case SCREEN_SURFACE:
|
||||
if (changedLines) {
|
||||
int y = 0;
|
||||
Bitu index = 0, rectCount = 0;
|
||||
size_t index = 0;
|
||||
size_t rect_count = 0;
|
||||
while (y < sdl.draw.height) {
|
||||
if (!(index & 1)) {
|
||||
y += changedLines[index];
|
||||
} else {
|
||||
SDL_Rect *rect = &sdl.updateRects[rectCount++];
|
||||
SDL_Rect *rect = &sdl.updateRects[rect_count++];
|
||||
rect->x = sdl.clip.x;
|
||||
rect->y = sdl.clip.y + y;
|
||||
rect->w = sdl.draw.width;
|
||||
|
@ -1627,8 +1628,10 @@ void GFX_EndUpdate( const Bit16u *changedLines ) {
|
|||
}
|
||||
index++;
|
||||
}
|
||||
if (rectCount)
|
||||
SDL_UpdateWindowSurfaceRects(sdl.window, sdl.updateRects, rectCount);
|
||||
if (rect_count)
|
||||
SDL_UpdateWindowSurfaceRects(sdl.window,
|
||||
sdl.updateRects,
|
||||
rect_count);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue