« Return to Thread: [FIX] lockSurfaces

[FIX] lockSurfaces

by Bert Freudenberg-3 :: Rate this Message:

Reply to Author | View in Thread

There is a wrong condition in an almost never-taken branch of  
BitBltSimulation>>lockSurfaces (when src=dst):

                 isWarping ifFalse:[
                     "When warping we always need the entire surface  
for the source"
                     sourceBits _ self cCode:'fn(sourceHandle,  
&sourcePitch, 0,0, sourceWidth, sourceHeight)'.
                 ] ifTrue:[
                     "Otherwise use overlapping area"
                     l _ sx min: dx. r _ (sx max: dx) + bbW.
                     t _ sy min: dy. b _ (sy max: sy) + bbH.
                     sourceBits _ self cCode:'fn(sourceHandle,  
&sourcePitch, l, t, r-l, b-t)'.
                 ].

As the comments indicate, the condition is reversed. Please include  
attached fix in VMMaker.

- Bert -





bltBltLockFix-bf.1.cs.gz (2K) Download Attachment

 « Return to Thread: [FIX] lockSurfaces

LightInTheBox - Buy quality products at wholesale price