File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1212 * ` getMouseLocation ` in ` SDL.Input.Mouse `
1313* Merge ` isScreenSaverEnabled, ` enableScreenSaver` , and ` disableScreenSaver`
1414 into a ` screenSaverEnabled ` StateVar.
15+ * Make function ` surfaceBlit ` in ` SDL.Video.Renderer ` return final blit
16+ rectangle post-clipping.
1517* Fix issue with ` setWindowMode ` transitions not working properly between
1618 fullscreen and windowed modes.
1719
Original file line number Diff line number Diff line change @@ -155,12 +155,13 @@ surfaceBlit :: MonadIO m
155155 -> Maybe (Rectangle CInt ) -- ^ The rectangle to be copied, or 'Nothing' to copy the entire surface
156156 -> Surface -- ^ The 'Surface' that is the blit target
157157 -> Maybe (Point V2 CInt ) -- ^ The position to blit to
158- -> m ()
158+ -> m (Maybe ( Rectangle CInt ) )
159159surfaceBlit (Surface src _) srcRect (Surface dst _) dstLoc = liftIO $
160- throwIfNeg_ " SDL.Video.blitSurface" " SDL_BlitSurface" $
161160 maybeWith with srcRect $ \ srcPtr ->
162- maybeWith with (fmap (flip Rectangle 0 ) dstLoc) $ \ dstPtr ->
163- Raw. blitSurface src (castPtr srcPtr) dst (castPtr dstPtr)
161+ maybeWith with (fmap (flip Rectangle 0 ) dstLoc) $ \ dstPtr -> do
162+ throwIfNeg " SDL.Video.blitSurface" " SDL_BlitSurface" $
163+ Raw. blitSurface src (castPtr srcPtr) dst (castPtr dstPtr)
164+ maybe (pure Nothing ) (\ _ -> Just <$> peek dstPtr) dstLoc
164165
165166-- | Create a texture for a rendering context.
166167--
You can’t perform that action at this time.
0 commit comments