MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_iokit_hid_generic_driver.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_IOKIT_HID_GENERIC_DRIVER_H_1610355183
12#define INCGUARD_MGL_IOKIT_HID_GENERIC_DRIVER_H_1610355183
13
15#if defined(MGL_GAMEPAD_DELEGATE_ENABLE_IOKIT_HID)
16
18
19namespace MGL::Input::IOKitHID
20{
22class GenericGamepadDriver : public GamepadDriver
23{
24public:
25 /* ------------------------------------------------------------------------- */
33 /* ------------------------------------------------------------------------- */
34 static constexpr bool IsManageable([[maybe_unused]] int32_t vendorID, [[maybe_unused]] int32_t productID) noexcept
35 {
36 // どのドライバも対応していない場合に使用する標準ドライバなので常にtrue
37 return true;
38 }
39
40 bool Initialize(IOHIDDeviceRef device) noexcept override;
41 bool UpdateState(MGL::Input::PadState &state, IOHIDDeviceRef device) noexcept override;
42
43private:
44 Axis _axisX;
45 Axis _axisY;
46 Axis _axisZ;
47 Axis _axisRz;
48
49 bool _hasDPad{false};
50 bool _hasHatswitch{false};
51};
52} // namespace MGL::Input::IOKitHID
53
54#endif // MGL_GAMEPAD_DELEGATE_ENABLE_IOKIT_HID
55#endif // INCGUARD_MGL_IOKIT_HID_GENERIC_DRIVER_H_1610355183
56
57// vim: et ts=4 sw=4 sts=4
ゲームパッドステートクラス
Definition mgl_gamepad_state.h:26
bool Initialize(InitializerDelegate &initializer, MakeAppDelegateFunction makeAppDelegate) noexcept
MGL初期化処理
Definition mgl_initialize.cc:67
MGL IOKit HID用軸パラメータクラス
MGL IOKit HID ゲームパッドドライバ