shithub: ft²

Download patch

ref: f95fbe700c79283f81a92f4628fceaf55c1ded49
parent: fa3648bd5dce9e16db90df45b2d11f6987063b18
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Jun 19 13:46:59 EDT 2023

Remove Raspberry Pi video scale limit

--- a/src/ft2_video.c
+++ b/src/ft2_video.c
@@ -820,18 +820,6 @@
 	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 @@
 		{
 			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 @@
 
 			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
 		{