ft2-clone

Fasttracker 2 clone
Log | Files | Refs | README | LICENSE

commit f95fbe700c79283f81a92f4628fceaf55c1ded49
parent fa3648bd5dce9e16db90df45b2d11f6987063b18
Author: Olav Sørensen <olav.sorensen@live.no>
Date:   Mon, 19 Jun 2023 17:46:32 +0200

Remove Raspberry Pi video scale limit

Diffstat:
Msrc/ft2_video.c | 22++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/src/ft2_video.c b/src/ft2_video.c @@ -820,18 +820,6 @@ void setWindowSizeFromConfig(bool updateRenderer) uint8_t i; SDL_DisplayMode dm; - /* Kludge for Raspbarry Pi. Upscaling of 3x or higher makes everything slow as a snail. - ** This hack unfortunately applies to any ARM based device, but I doubt 3x/4x would run - ** smooth on any ARM device suitable for the FT2 clone anyway (excluding tablets/phones). - */ -#ifdef __arm__ - if ((config.windowFlags & WINSIZE_3X) || (config.windowFlags & WINSIZE_4X)) - { - config.windowFlags &= ~(WINSIZE_1X + WINSIZE_2X + WINSIZE_3X + WINSIZE_4X); - config.windowFlags |= WINSIZE_AUTO; - } -#endif - uint8_t oldUpscaleFactor = video.upscaleFactor; if (config.windowFlags & WINSIZE_AUTO) { @@ -844,8 +832,8 @@ void setWindowSizeFromConfig(bool updateRenderer) { for (i = MAX_UPSCALE_FACTOR; i >= 1; i--) { - // slightly bigger than 632x400 because of window title, window borders and taskbar/menu - if (dm.w >= 640*i && dm.h >= 450*i) + // height test is slightly taller because of window title, window borders and taskbar/menu/dock + if (dm.w >= SCREEN_W*i && dm.h >= (SCREEN_H+64)*i) { video.upscaleFactor = i; break; @@ -854,12 +842,6 @@ void setWindowSizeFromConfig(bool updateRenderer) if (i == 0) video.upscaleFactor = 1; // 1x is not going to fit, but use 1x anyways... - - // kludge (read comment above) -#ifdef __arm__ - if (video.upscaleFactor > 2) - video.upscaleFactor = 2; -#endif } else {