Skip to content

Commit

Permalink
Remove misleading result from updateTexture
Browse files Browse the repository at this point in the history
The original SDL_UpdateTexture doesn't have that either.
  • Loading branch information
dpwiz committed Mar 10, 2022
1 parent 40e89b2 commit a7d7294
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/SDL/Video/Renderer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,13 @@ updateTexture :: (Functor m, MonadIO m)
-> Maybe (Rectangle CInt) -- ^ The area to update, Nothing for entire texture
-> BS.ByteString -- ^ The raw pixel data
-> CInt -- ^ The number of bytes in a row of pixel data, including padding between lines
-> m Texture
updateTexture tex@(Texture t) rect pixels pitch = do
-> m ()
updateTexture (Texture t) rect pixels pitch = do
liftIO $ throwIfNeg_ "SDL.Video.updateTexture" "SDL_UpdateTexture" $
maybeWith with rect $ \rectPtr ->
let (pixelForeign, _, _) = BSI.toForeignPtr pixels
in withForeignPtr pixelForeign $ \pixelsPtr ->
Raw.updateTexture t (castPtr rectPtr) (castPtr pixelsPtr) pitch
return tex

-- | Destroy the specified texture.
--
Expand Down

0 comments on commit a7d7294

Please sign in to comment.