Skip to content

Commit 432f666

Browse files
authored
Remove misleading result from updateTexture (#253)
The original SDL_UpdateTexture doesn't have that either.
1 parent de47a51 commit 432f666

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/SDL/Video/Renderer.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,13 @@ updateTexture :: (Functor m, MonadIO m)
224224
-> Maybe (Rectangle CInt) -- ^ The area to update, Nothing for entire texture
225225
-> BS.ByteString -- ^ The raw pixel data
226226
-> CInt -- ^ The number of bytes in a row of pixel data, including padding between lines
227-
-> m Texture
228-
updateTexture tex@(Texture t) rect pixels pitch = do
227+
-> m ()
228+
updateTexture (Texture t) rect pixels pitch = do
229229
liftIO $ throwIfNeg_ "SDL.Video.updateTexture" "SDL_UpdateTexture" $
230230
maybeWith with rect $ \rectPtr ->
231231
let (pixelForeign, _, _) = BSI.toForeignPtr pixels
232232
in withForeignPtr pixelForeign $ \pixelsPtr ->
233233
Raw.updateTexture t (castPtr rectPtr) (castPtr pixelsPtr) pitch
234-
return tex
235234

236235
-- | Destroy the specified texture.
237236
--

0 commit comments

Comments
 (0)