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 842 - Wrong blitting in testbitmap test
Summary: Wrong blitting in testbitmap test
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 09:30 UTC by Mike Gorchak
Modified: 2013-05-21 01:08 UTC (History)
1 user (show)

See Also:


Attachments
Screenshot of the issue (10.66 KB, image/png)
2009-10-12 09:32 UTC, Mike Gorchak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gorchak 2009-10-12 09:30:09 UTC
If you clicks left mouse button very close to the left border of the window of testbitmap test the blitted bitmap has been drawn incorrect.

The test was ran on QNX, but this is a crossplatform issue, since the software renderer is in use.

See the attached image.
Comment 1 Mike Gorchak 2009-10-12 09:32:05 UTC
Created attachment 414 [details]
Screenshot of the issue
Comment 2 Sam Lantinga 2009-12-16 20:55:05 UTC
This bug looks like it's always been there.  Here's the code that's wrong:
SDL_blit.c, line 70:
        info->src = (Uint8 *) src->pixels +
            (Uint16) srcrect->y * src->pitch +
            (Uint16) srcrect->x * info->src_fmt->BytesPerPixel;
and of course:
        info->src_skip =
            info->src_pitch - info->src_w * info->src_fmt->BytesPerPixel;

The fix is non-trivial.  Is this affecting something you're working on?
Comment 3 Sam Lantinga 2013-05-21 01:08:10 UTC
No response in 4 years.  Closing bug.