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

Summary: 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.
Product: SDL Reporter: Beoran <beoran>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.0   
Hardware: All   
OS: All   
Attachments: Patch to fix the SDL_LowerBlitScaled problem.

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!