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 */
#endif
#if defined(TARGET_SDL2)
-#if USE_RENDERER
if (rect)
{
int bytes_x = screen->pitch / video.width;
// 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);
// 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);
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
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;
SDL_RenderCopy(sdl_renderer, texture, &src_rect, &dst_rect);
#endif
-#endif
}
void SDLFillRectangle(Bitmap *dst_bitmap, int x, int y, int width, int height,