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 1257 - SDL_Blit not working after SDL_BlitScaled because SDL_LowerBlitScaled munges it's src's and dest's clip rectangles and doesn't restore them.
Summary: SDL_Blit not working after SDL_BlitScaled because SDL_LowerBlitScaled munges...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.0
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-27 06:06 UTC by Beoran
Modified: 2013-05-21 02:51 UTC (History)
0 users

See Also:


Attachments
Patch to fix the SDL_LowerBlitScaled problem. (1.51 KB, patch)
2011-07-27 06:06 UTC, Beoran
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beoran 2011-07-27 06:06:28 UTC
Created attachment 659 [details]
Patch to fix the SDL_LowerBlitScaled problem.

SDL_Blit cannot be used correctly after calling SDL_BlitScaled because  SDL_LowerBlitScaled munges it's src's and dest's clip rectangles and doesn't restore them. As a result of this bug, SDL_BLit wil not display some bitmaps after they have been dsiplayed witj SDL_BlitScaled, because their clip rectangle and that of the screen is now all messed up. 

A patch for SDL_surface.c against the latest hg version is attached to solve this problem. Please review and apply if acceptable.

On another note, why does SDL_LowerBLitScaled call SDL_SetClipRect on both src and dst? It would be easier if it wasn't needed by the lower function SDL_SoftStretch.
Comment 1 Sam Lantinga 2013-05-21 02:51:05 UTC
I believe this is fixed in the current snapshot:
http://www.libsdl.org/tmp/SDL-2.0.zip

Please reopen this bug if that isn't the case.

Thanks!