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 3324

Summary: SDL_RenderReadPixels: Wrong rect coordinates with software renderer
Product: SDL Reporter: Daniel <daniel.plakhotich>
Component: renderAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.4   
Hardware: x86_64   
OS: Linux   
Attachments: Patch

Description Daniel 2016-05-08 21:24:07 UTC
SDL_RenderReadPixels with SDL_RENDERER_SOFTWARE reads pixels from wrong coordinates.

SW_RenderReadPixels adjusts the rect coordinates according to the viewport. But since this is already done by SDL_RenderReadPixels, the final rect has x2 bigger X and Y.
Comment 1 Daniel 2017-04-26 14:17:46 UTC
Created attachment 2726 [details]
Patch

Here is a patch to fix the bug.
Comment 2 Sam Lantinga 2017-08-11 18:54:37 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/62db9336e07b