Hello. I want to update part of the screen and so I use SDL_UpdateWindowSurfaceRects(win, rects, count); in my loop. This works well on macos and linux. But on windows entire screen is updated (even though I pass good rects). I did some research in SDL source code and found out that the function SDL_UpdateWindowSurfaceRects uses on windows is:
int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
BitBlt(data->hdc, 0, 0, window->w, window->h, data->mdc, 0, 0, SRCCOPY);
return 0;
}
As you can see this function calls BitBlt on entire screen, even though it accepts the rects. Rects variable is not even used in this function at all. Now my question is why is that the case? In SDL 1.2 it used to be (I will write just part of code)
for ( i=0; i<numrects; ++i ) {
BitBlt(hdc, rects[i].x, rects[i].y, rects[i].w, rects[i].h,
mdc, rects[i].x, rects[i].y, SRCCOPY);
}
Thanks in advance.