diff options
Diffstat (limited to 'textscreen/txt_sdl.c')
-rw-r--r-- | textscreen/txt_sdl.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index 5576a151..7d0e9a3e 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -218,12 +218,12 @@ static void ChooseFont(void) { font = &large_font; } -#else - else if (info->current_w >= 1920 && info->current_h >= 1080) - { - font = &large_font; - } #endif + // TODO: Detect high DPI on Linux by inquiring about Gtk+ scale + // settings. This looks like it should just be a case of shelling + // out to invoke the 'gsettings' command, eg. + // gsettings get org.gnome.desktop.interface text-scaling-factor + // and using large_font if the result is >= 2. else { font = &main_font; @@ -412,11 +412,7 @@ void TXT_UpdateScreen(void) void TXT_GetMousePosition(int *x, int *y) { -#if SDL_VERSION_ATLEAST(1, 3, 0) - SDL_GetMouseState(0, x, y); -#else SDL_GetMouseState(x, y); -#endif *x /= font->w; *y /= font->h; @@ -466,10 +462,8 @@ static int TranslateKey(SDL_keysym *sym) case SDLK_LALT: case SDLK_RALT: -#if !SDL_VERSION_ATLEAST(1, 3, 0) case SDLK_LMETA: case SDLK_RMETA: -#endif return KEY_RALT; case SDLK_CAPSLOCK: return KEY_CAPSLOCK; @@ -604,10 +598,8 @@ static void UpdateModifierState(SDL_keysym *sym, int pressed) case SDLK_LALT: case SDLK_RALT: -#if !SDL_VERSION_ATLEAST(1, 3, 0) case SDLK_LMETA: case SDLK_RMETA: -#endif mod = TXT_MOD_ALT; break; |