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