目次 - SDL 3.0 API(機能別) - ゲームパッド - SDL_GetGamepadButton

SDL_GetGamepadButton

ゲームパッドのボタンの状態を得る

ヘッダ

SDL3/SDL_gamepad.h

構文

bool SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);

引数

SDL_Gamepad *gamepadゲームパッド
SDL_GamepadButtonbuttonボタンのインデックス番号(SDL_GamepadButtonの値の1つ)

戻り値

(bool) ボタンが押されているとき真, そうでないとき偽を戻す.

スレッドセーフ

この関数はどのスレッドからも安全に呼べる.

バージョン

SDL 3.2.0以降

関連項目

SDL Wikiへのリンク

SDL_GetGamepadButton - SDL Wiki