#endif
video.window_scaling_percent = setup.window_scaling_percent;
+ video.window_scaling_quality = setup.window_scaling_quality;
#if defined(TARGET_SDL2)
int num_displays = SDL_GetNumVideoDisplays();
if (sdl_renderer != NULL)
{
SDL_RenderSetLogicalSize(sdl_renderer, width, height);
- SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
+ // SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, setup.window_scaling_quality);
sdl_texture = SDL_CreateTexture(sdl_renderer,
SDL_PIXELFORMAT_ARGB8888,
video.fullscreen_enabled = FALSE;
video.window_scaling_percent = setup.window_scaling_percent;
+ video.window_scaling_quality = setup.window_scaling_quality;
success = TRUE;
}
video.window_height = new_window_height;
}
+void SDLSetWindowScalingQuality(char *window_scaling_quality)
+{
+ if (sdl_texture == NULL)
+ return;
+
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, window_scaling_quality);
+
+ SDL_Texture *new_texture = SDL_CreateTexture(sdl_renderer,
+ SDL_PIXELFORMAT_ARGB8888,
+ SDL_TEXTUREACCESS_STREAMING,
+ video.width, video.height);
+
+ if (new_texture != NULL)
+ {
+ SDL_DestroyTexture(sdl_texture);
+
+ sdl_texture = new_texture;
+
+ SDLRedrawWindow();
+ }
+
+ video.window_scaling_quality = window_scaling_quality;
+}
+
void SDLSetWindowFullscreen(boolean fullscreen)
{
if (sdl_window == NULL)