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 3981

Summary: Inverted logic bug in SDL_renderer "overscan" feature
Product: SDL Reporter: Eric wing <ewmailing>
Component: renderAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: 2.0.7   
Hardware: All   
OS: All   
Attachments: patch to fix inverted logic for overscan mode

Description Eric wing 2017-11-27 18:33:38 UTC
There is a tiny bug in the new overscan code for the SDL_renderer.

In SDL_renderer.c, line 1265, the if check for SDL_strcasecmp with "direct3d" needs to be inverted.

Instead of:
if(SDL_strcasecmp("direct3d", SDL_GetCurrentVideoDriver())) {

It should be:
if(0 == SDL_strcasecmp("direct3d", SDL_GetCurrentVideoDriver())) {


This bug causes the "overscan" mode to pretty much be completely ignored in all cases and all things remain letterboxed (as before the feature).


Sorry, I'm not sure how this got through. My original branch/patch was working, but I only just tried a completely clean official repo and noticed overscan wasn't working.
Comment 1 Eric wing 2017-11-27 18:40:29 UTC
Here's a link to a repo with the fixed commit/patch that you can pull/merge from:

https://bitbucket.org/ewing/sdloverscanbugfix
Comment 2 Sam Lantinga 2017-12-05 04:28:29 UTC
Can you attach a patch to the bug report?
Comment 3 Eric wing 2017-12-05 06:58:00 UTC
Created attachment 3109 [details]
patch to fix inverted logic for overscan mode

Attached is the patch
Comment 4 Sam Lantinga 2017-12-13 00:35:28 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/cb68160b3ace

My fix is a little more complicated since I made the code a little more easy to understand.