src/render/SDL_render.c


Log

Author Commit Date CI Message
Ryan C. Gordon ca0bf151 2017-03-03T16:38:17 Fix some more compiler warnings on armcc.
Ryan C. Gordon c1ac4c68 2017-01-06T21:17:33 Better fix for static analysis issue in SDL_DestroyRenderer(). Follow up fix for Bugzilla #3544.
Sam Lantinga 3df77ced 2017-01-06T00:40:22 Just roll back the entire portion of the commit from a8253d439914 which caused bug 3544 until we figure out what the right static analysis fix is.
Sam Lantinga 356c2ead 2017-01-06T00:32:06 Fixed bug 3544 - Memory freeing bug in SDL_DestroyRenderer/SDL_DestroyTexture felix Here's a snippet of SDL_DestroyRenderer from hg revision 10746:7540ff5d0e0e: SDL_Texture *texture = NULL; SDL_Texture *nexttexture = NULL; /* ... */ for (texture = renderer->textures; texture; texture = nexttexture) { nexttexture = texture->next; SDL_DestroyTexture(texture); } SDL_DestroyTexture removes the texture from the linked list pointed to by the renderer and ends up calling SDL_DestroyTextureInternal, which contains this: if (texture->native) { SDL_DestroyTexture(texture->native); } If it happens that texture->native is an alias of nexttexture two stack frames up, SDL_DestroyRenderer will end up trying to destroy an already freed texture. I've had this very situation happen in dosemu2. Bug introduced in revision 10650:a8253d439914, which has a somewhat ironic description of "Fixed all known static analysis bugs"...
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Ryan C. Gordon fb5fd67c 2016-11-24T21:41:09 Fixed all known static analysis bugs, with checker-279 on macOS.
Sam Lantinga 8e2634eb 2016-10-14T00:51:57 Fixed divide by zero if setting integer scale without setting logical width and height
Sam Lantinga 27d4f099 2016-10-07T23:40:44 Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
Sam Lantinga 9c483655 2016-10-07T18:00:30 Fixed bug 3029 - software renderer cuts off edges when rotate-blitting with a multiple of 90 degrees Adam M. When doing a rotated texture copy with the software renderer, where the angle is a multiple of 90 degrees, one or two edges of the image get cut off. This is because of the following line in sw_rotate.c: if ((unsigned)dx < (unsigned)sw && (unsigned)dy < (unsigned)sh) { which is effectively saying: if (dx >= 0 && dx < src->w-1 && dy >= 0 && dy < src->h-1) { As a result, it doesn't process pixels in the right column or bottom row of the source image (except when they're accessed as part of the bilinear filtering for nearby pixels). This causes it to look like the edges are cut off, and it's especially obvious with an exact multiple of 90 degrees.
Sam Lantinga c8cfccc2 2016-10-01T14:31:00 Fixed bug 3116 - renderer->hidden in SDL_RenderCopy(Ex) Daniel Seems like check of the visibility of renderer (renderer->hidden) is missing in SDL_RenderCopyEx. In SDL_RenderCopy it should be done much earlier (after checking support for RenderCopyEx, line 1750).
Sam Lantinga 67901f53 2016-10-01T13:29:30 Fixed bug 3174 - SDL_SetRenderTarget clip rect Marcel Bakker In SDL_SetRenderTarget(), i think the intended behavior was to clear the clip rect when a new target is set.
Philipp Wiesemann 0a1999df 2016-01-16T21:25:10 Fixed compile warnings about type conversion. Found by buildbot.
Ethan Lee 167cf14c 2016-01-05T16:39:18 SDL_RenderSetIntegerScale
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
David Ludwig 9e9ef5ad 2015-12-27T17:55:45 Fixed bug 3202 - Fix renderer visibility on a window maximized directly from the minimized state Many thanks to id.zeta for details on the bug, and for the fix!
Philipp Wiesemann 0856a7ef 2015-08-21T23:50:37 Changed an error return value from 0 to NULL for consistency.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().