| Summary: | Inverted logic bug in SDL_renderer "overscan" feature | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Eric wing <ewmailing> |
| Component: | render | Assignee: | 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 | ||
Here's a link to a repo with the fixed commit/patch that you can pull/merge from: https://bitbucket.org/ewing/sdloverscanbugfix Can you attach a patch to the bug report? Created attachment 3109 [details]
patch to fix inverted logic for overscan mode
Attached is the patch
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. |
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.