History

Remove Raspberry Pi video scale limit

Olav Sørensen committed 3 years ago

Commit f95fbe71 parent fa3648b1 file · +2 −20Browse files

Unified · Split

src/ft2_video.c+2−20
@@ -820,18 +820,6 @@ void setWindowSizeFromConfig(bool updateRenderer) · 819 unmodified lines
820820 uint8_t i;
821821 SDL_DisplayMode dm;
822822
823− /* Kludge for Raspbarry Pi. Upscaling of 3x or higher makes everything slow as a snail.
824− ** This hack unfortunately applies to any ARM based device, but I doubt 3x/4x would run
825− ** smooth on any ARM device suitable for the FT2 clone anyway (excluding tablets/phones).
826− */
827−#ifdef __arm__
828− if ((config.windowFlags & WINSIZE_3X) || (config.windowFlags & WINSIZE_4X))
829− {
830− config.windowFlags &= ~(WINSIZE_1X + WINSIZE_2X + WINSIZE_3X + WINSIZE_4X);
831− config.windowFlags |= WINSIZE_AUTO;
832− }
833−#endif
834−
835823 uint8_t oldUpscaleFactor = video.upscaleFactor;
836824 if (config.windowFlags & WINSIZE_AUTO)
837825 {
@@ -844,8 +832,8 @@ void setWindowSizeFromConfig(bool updateRenderer) · 6 unmodified lines
844832 {
845833 for (i = MAX_UPSCALE_FACTOR; i >= 1; i--)
846834 {
847− // slightly bigger than 632x400 because of window title, window borders and taskbar/menu
848− if (dm.w >= 640*i && dm.h >= 450*i)
835+ // height test is slightly taller because of window title, window borders and taskbar/menu/dock
836+ if (dm.w >= SCREEN_W*i && dm.h >= (SCREEN_H+64)*i)
849837 {
850838 video.upscaleFactor = i;
851839 break;
@@ -854,12 +842,6 @@ void setWindowSizeFromConfig(bool updateRenderer) · 2 unmodified lines
854842
855843 if (i == 0)
856844 video.upscaleFactor = 1; // 1x is not going to fit, but use 1x anyways...
857−
858− // kludge (read comment above)
859−#ifdef __arm__
860− if (video.upscaleFactor > 2)
861− video.upscaleFactor = 2;
862−#endif
863845 }
864846 else
865847 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t