shithub: choc

Download patch

ref: 346490a4dd1c7ee8c5c5ee8a5feee817f2480ba1
parent: ec90c9fa062440dd25e4e7fe9a3df58db7c55081
author: Jonathan Dowland <jon+github@alcopop.org>
date: Mon Jul 4 02:25:21 EDT 2016

textscreen: fix check for size of screen

SDL_GetCurrentDisplayMode returns 0 on fail.

Fixes #742.

--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@ -198,7 +198,7 @@
     // Get desktop resolution.
     // If in doubt and we can't get a list, always prefer to
     // fall back to the normal font:
-    if (!SDL_GetCurrentDisplayMode(0, &desktop_info))
+    if (SDL_GetCurrentDisplayMode(0, &desktop_info))
     {
         font = &highdpi_font;
         return;