[SOLVED] Missing screen resolution in SDL 1.2

Hi,

I’m using SDL 1.2 on a small embedded device running a derivate of Debian Jessie. The device has a TFT with 480x272 screen size.

The problem is that SDL only reports these supported screen resolutions:

(1600, 1200)
(1280, 1024)
(1024, 1024)
(1280, 960)
(1152, 864)
(1024, 768)
(800, 600)
(768, 576)
(640, 480)

Since my desired resolution of 480x272 is missing, the next higher one 640x480 is used, and my application is scaled down and centered on the screen, leaving a big black border all around. Since the screen is already rather small it is not usable this way.

How can I get SDL to support 480x272? Is the list of supported resolutions compiled into SDL, and if not, how can I modify that list without rebuilding SDL?

I’m using the standard SDL 1.2 Debian package. Actually I am using it indirectly through pyGame, but after looking at the pyGame sources and writing a little SDL-test in C I realized that the problem stems from SDL, not pyGame (pyGame is build upon SDL) - my SDL test shows the same defect. The hardware I’m working on is a modified Raspberry Pi 2 (the device is called an Armadillo 43T).

Thanks and best regards,
Christian

At the lowest level, the problem was caused by a misconfigured frame buffer device, it only accepts modes listed in /etc/fb.modes, and my video settings were missing.

I found the correct settings using the fbset utility, put them into /etc/fb.modes, rebooted and everything works as expected now.

1 Like