commit dff593a620a4db7d017ca54a52f7a942c72350f6
Author: Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sat Mar 5 01:33:42 2016 -0500
Commit: Simon Howard <fraggle@soulsphere.org>
CommitDate: Sat Mar 5 01:33:42 2016 -0500
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.
---
textscreen/txt_sdl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c
index 5fad0c7e..0c1ea4c7 100644
--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@ -449,6 +449,8 @@ void TXT_UpdateScreenArea(int x, int y, int w, int h)
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);