We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4944

Summary: fbdev: Double-buffering with non-fullscreen resolution
Product: SDL Reporter: Paul Cercueil <paul>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: HG 1.2   
Hardware: All   
OS: Linux   
Attachments: Patch to fix the issue

Description Paul Cercueil 2020-01-13 18:14:59 UTC
Created attachment 4160 [details]
Patch to fix the issue

From the patch:

"If an exact resolution match is not found, SDL will accept a higher
resolution and add black bars around it. For example, when 320x200 is
requested by only 320x240 is available, it will add 20 black lines on
the top and the bottom of the screen. The surface that SDL returns to
the application will look like it actually got 320x200.

When double buffering, the actual video mode's height should be used
instead of the height before adding the black borders. For the pixel
pointer this was done correctly, but for the vertical panning offset
the wrong height was used."
Comment 1 Ozkan Sezer 2020-09-22 02:08:33 UTC
The patch is in. Thanks.
http://hg.libsdl.org/SDL/rev/6097967fb3b4