目次 - SDL 2.0 API(機能別) - ゲームコントローラー - SDL_GameControllerGetButton
(SDL3バージョンはSDL3/SDL_GetGamepadButtonを参照すること)
SDL_GameControllerGetButton
ゲームコントローラーのボタンの状態を得る
構文
Uint8 SDL_GameControllerGetButton(SDL_GameController* gamecontroller, SDL_GameControllerButton button)
引数
戻り値
押されているとき1, 押されていないまたは失敗のとき0を戻す.
SDL_GetError()で詳細を知ることができる.
詳細
ボタン番号は0から始まる.
バージョン
SDL 2.0.0以降
関連項目(関数)
SDL_GameControllerGetAxis
SDL Wikiへのリンク
SDL_GameControllerGetButton - SDL Wiki