src/render


Log

Author Commit Date CI Message
Sam Lantinga da190975 2015-05-28T18:57:10 Fixed clip rectangle calculation when there is a viewport offset
Sam Lantinga 6a3ad8a9 2015-05-28T12:18:05 Fixed bug 2367 - Bad mouse motion coordinates with two windows where one has changed logical size Andreas Ragnerstam I have two windows where one has a renderer where the logical size has been changed with SDL_RenderSetLogicalSize. When I get SDL_MOUSEMOTION events belonging to the non-scaled window these will have been scaled with the factor of the scaled window, which is not expected. Adding some printf debugging to SDL_RendererEventWatch of SDL_render.c, where (event->type == SDL_MOUSEMOTION), I found that for every mouse motion SDL_RendererEventWatch is called twice and the event->motion.x and event.motion.y are set twice for the event, once for each renderer where only the last one set will be saved to the event struct. This will work fine if both renderers have the same scale, but otherwise the motion coordinates will be scaled for the renderer belonging to another window than the mouse was moved in. I guess one solution would be to check that window == renderer->window for SDL_MOUSEMOTION events, similar to what is done for when SDL_WINDOWEVENT events. I get the same error on both X11 and Windows. The same problem also exists for SDL_MOUSEBUTTONDOWN and SDL_MOUSEBUTTONUP events.
Ryan C. Gordon d5a57853 2015-05-26T16:42:36 Drop out of SDL_UpdateTexture() early if the rectangle is zero pixels. Hopefully makes static analysis happy about a zero-byte malloc elsewhere.
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Alex Szpakowski fcee3e73 2015-05-16T17:35:36 Code style cleanup in the GLES and GLES2 render backends.
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.