From: Holger Schemel Date: Thu, 31 Mar 2016 17:55:16 +0000 (+0200) Subject: removed support for non-renderer graphics for SDL2 target X-Git-Tag: 4.0.0.0-rc1~28 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ef528d63970936d8311ea3064dbbae282a9d58d6;p=rocksndiamonds.git removed support for non-renderer graphics for SDL2 target --- diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 786368d2..39920c83 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -36,8 +36,6 @@ static SDL_Texture *sdl_texture_target = NULL; static SDL_Texture *sdl_texture = NULL; #endif static boolean fullscreen_enabled = FALSE; - -#define USE_RENDERER TRUE #endif /* stuff needed to work around SDL/Windows fullscreen drawing bug */ @@ -125,7 +123,6 @@ static void UpdateScreen(SDL_Rect *rect) #endif #if defined(TARGET_SDL2) -#if USE_RENDERER if (rect) { int bytes_x = screen->pitch / video.width; @@ -179,14 +176,6 @@ static void UpdateScreen(SDL_Rect *rect) // show render target buffer on screen SDL_RenderPresent(sdl_renderer); -#else - - if (rect) - SDL_UpdateWindowSurfaceRects(sdl_window, rect, 1); - else - SDL_UpdateWindowSurface(sdl_window); -#endif - #else // TARGET_SDL if (rect) SDL_UpdateRects(screen, 1, rect); @@ -662,7 +651,6 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer, // store if initial screen mode is fullscreen mode when changing screen size video.fullscreen_initial = fullscreen; -#if USE_RENDERER float window_scaling_factor = (float)setup.window_scaling_percent / 100; #if !USE_DESKTOP_FULLSCREEN float screen_scaling_factor = (fullscreen ? 1 : window_scaling_factor); @@ -791,21 +779,6 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer, Error(ERR_WARN, "SDL_CreateWindow() failed: %s", SDL_GetError()); } -#else - - if (sdl_window) - SDL_DestroyWindow(sdl_window); - - sdl_window = SDL_CreateWindow(program.window_title, - SDL_WINDOWPOS_CENTERED, - SDL_WINDOWPOS_CENTERED, - width, height, - surface_flags); - - if (sdl_window != NULL) - new_surface = SDL_GetWindowSurface(sdl_window); -#endif - #else new_surface = SDL_SetVideoMode(width, height, video.depth, surface_flags); #endif @@ -1142,7 +1115,6 @@ void SDLBlitTexture(Bitmap *bitmap, int dst_x, int dst_y, int mask_mode) { #if defined(TARGET_SDL2) -#if USE_RENDERER SDL_Texture *texture; SDL_Rect src_rect; SDL_Rect dst_rect; @@ -1165,7 +1137,6 @@ void SDLBlitTexture(Bitmap *bitmap, SDL_RenderCopy(sdl_renderer, texture, &src_rect, &dst_rect); #endif -#endif } void SDLFillRectangle(Bitmap *dst_bitmap, int x, int y, int width, int height,