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 - Inverted logic bug in SDL_renderer "overscan" feature
Summary: Inverted logic bug in SDL_renderer "overscan" feature
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.7
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-27 18:33 UTC by Eric wing
Modified: 2017-12-13 00:35 UTC (History)
1 user (show)

See Also:


Attachments
patch to fix inverted logic for overscan mode (561 bytes, patch)
2017-12-05 06:58 UTC, Eric wing
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.