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
820 uint8_t i;820 uint8_t i;
821 SDL_DisplayMode dm;821 SDL_DisplayMode dm;
822 822
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
835 uint8_t oldUpscaleFactor = video.upscaleFactor;823 uint8_t oldUpscaleFactor = video.upscaleFactor;
836 if (config.windowFlags & WINSIZE_AUTO)824 if (config.windowFlags & WINSIZE_AUTO)
837 {825 {
@@ -844,8 +832,8 @@ void setWindowSizeFromConfig(bool updateRenderer) · 6 unmodified lines
844 {832 {
845 for (i = MAX_UPSCALE_FACTOR; i >= 1; i--)833 for (i = MAX_UPSCALE_FACTOR; i >= 1; i--)
846 {834 {
847 // slightly bigger than 632x400 because of window title, window borders and taskbar/menu835 // height test is slightly taller because of window title, window borders and taskbar/menu/dock
848 if (dm.w >= 640*i && dm.h >= 450*i)836 if (dm.w >= SCREEN_W*i && dm.h >= (SCREEN_H+64)*i)
849 {837 {
850 video.upscaleFactor = i;838 video.upscaleFactor = i;
851 break;839 break;
@@ -854,12 +842,6 @@ void setWindowSizeFromConfig(bool updateRenderer) · 2 unmodified lines
854 842
855 if (i == 0)843 if (i == 0)
856 video.upscaleFactor = 1; // 1x is not going to fit, but use 1x anyways...844 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
863 }845 }
864 else846 else
865 {847 {

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