X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=628ee38dc4b0da4a7ecd09158259945198bf4ca7;hb=5e13b105ad48e61a5cd46941c61a16ad00445248;hp=32635b5341a6f4ff7bfb6530742ae22482628e1b;hpb=9afa3bb01a86fb8640e763afb05b492619958b7f;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 32635b53..628ee38d 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -60,6 +60,23 @@ static void UpdateScreen(SDL_Rect *rect) LimitScreenUpdates(FALSE); +#if 0 + { + static int LastFrameCounter = 0; + boolean changed = (FrameCounter != LastFrameCounter); + + printf("::: FrameCounter == %d [%s]\n", FrameCounter, + (changed ? "-" : "SAME FRAME UPDATED")); + + LastFrameCounter = FrameCounter; + + /* + if (FrameCounter % 2) + return; + */ + } +#endif + #if defined(TARGET_SDL2) #if USE_RENDERER SDL_Surface *screen = backbuffer->surface; @@ -1181,14 +1198,7 @@ void SDLFadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height, if (draw_border_function != NULL) draw_border_function(); -#if defined(TARGET_SDL2) - // SDL_UpdateWindowSurface(sdl_window); - // SDL_UpdateWindowSurfaceRects(sdl_window, &dst_rect2, 1); UpdateScreen(&dst_rect2); -#else - // SDL_UpdateRect(surface_screen, dst_x, dst_y, width, height); - UpdateScreen(&dst_rect2); -#endif } } }