shithub: choc

Download patch

ref: dff593a620a4db7d017ca54a52f7a942c72350f6
parent: 25ce5f9c2b723a39c9b97079b4a2fd5a09b057ec
author: Simon Howard <[email protected]>
date: Fri Mar 4 20:33:42 EST 2016

textscreen: Set linear scaling for texture buffer.

This is important for OS X - if multiple displays are connected, not
all of them may be retina displays, so the window may be rendered as
though it is always on a retina display. In this case, it's important
to use linear scaling as the default nearest scaling can cause the
large font to be distorted.

--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@ -449,6 +449,8 @@
 
     SDL_UnlockSurface(screenbuffer);
 
+    SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
+
     // TODO: This is currently creating a new texture every time we render
     // the screen; find a more efficient way to do it.
     screentx = SDL_CreateTextureFromSurface(renderer, screenbuffer);