File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ module SDL.Raw.Event (
112112 gameControllerNameForIndex ,
113113 gameControllerOpen ,
114114 gameControllerUpdate ,
115+ gameControllerRumble ,
115116 isGameController ,
116117 eventBuffer ,
117118 eventBufferSize
@@ -235,6 +236,7 @@ foreign import ccall "SDL.h SDL_GameControllerName" gameControllerNameFFI :: Gam
235236foreign import ccall " SDL.h SDL_GameControllerNameForIndex" gameControllerNameForIndexFFI :: CInt -> IO CString
236237foreign import ccall " SDL.h SDL_GameControllerOpen" gameControllerOpenFFI :: CInt -> IO GameController
237238foreign import ccall " SDL.h SDL_GameControllerUpdate" gameControllerUpdateFFI :: IO ()
239+ foreign import ccall " SDL.h SDL_GameControllerRumble" gameControllerRumbleFFI :: GameController -> CUShort -> CUShort -> CUInt -> IO CInt
238240foreign import ccall " SDL.h SDL_IsGameController" isGameControllerFFI :: CInt -> IO Bool
239241
240242foreign import ccall " sdlhelper.c SDLHelper_GetEventBufferSize" eventBufferSize :: CInt
@@ -675,6 +677,10 @@ gameControllerUpdate :: MonadIO m => m ()
675677gameControllerUpdate = liftIO gameControllerUpdateFFI
676678{-# INLINE gameControllerUpdate #-}
677679
680+ gameControllerRumble :: MonadIO m => GameController -> CUShort -> CUShort -> CUInt -> m CInt
681+ gameControllerRumble v1 v2 v3 v4 = liftIO $ gameControllerRumbleFFI v1 v2 v3 v4
682+ {-# INLINE gameControllerRumble #-}
683+
678684isGameController :: MonadIO m => CInt -> m Bool
679685isGameController v1 = liftIO $ isGameControllerFFI v1
680686{-# INLINE isGameController #-}
You can’t perform that action at this time.
0 commit comments