X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibgame%2Fsdl.c;h=9f97f5366870ce1d5e63cdc9b43c6b101b4dd100;hb=71cea4c5471c3924c9b40e314d38fc209a48a499;hp=fe859452a07fc7fed8d6ca2b47b3114d735a628a;hpb=14ef59d8e791fc8a0d52978873555dc36d2d5ee0;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index fe859452..9f97f536 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -69,6 +69,9 @@ static void FinalizeScreen(int draw_target) static void UpdateScreenExt(SDL_Rect *rect, boolean with_frame_delay) { + if (program.headless) + return; + static DelayCounter update_screen_delay = { 50 }; // (milliseconds) SDL_Surface *screen = backbuffer->surface; @@ -589,8 +592,7 @@ static boolean SDLCreateScreen(boolean fullscreen) if (sdl_window) { - SDL_DestroyWindow(sdl_window); - sdl_window = NULL; + SDL_SetWindowSize(sdl_window, video.window_width, video.window_height); } } @@ -1904,22 +1906,6 @@ void SDLPutPixel(Bitmap *dst_bitmap, int x, int y, Pixel pixel) // quick (no, it's slow) and dirty hack to "invert" rectangle inside SDL surface // ---------------------------------------------------------------------------- -void SDLInvertArea(Bitmap *bitmap, int src_x, int src_y, - int width, int height, Uint32 color) -{ - int x, y; - - for (y = src_y; y < src_y + height; y++) - { - for (x = src_x; x < src_x + width; x++) - { - Uint32 pixel = SDLGetPixel(bitmap, x, y); - - SDLPutPixel(bitmap, x, y, pixel == BLACK_PIXEL ? color : BLACK_PIXEL); - } - } -} - void SDLCopyInverseMasked(Bitmap *src_bitmap, Bitmap *dst_bitmap, int src_x, int src_y, int width, int height, int dst_x, int dst_y)