diff options
author | Tony Wasserka <neobrainx@gmail.com> | 2015-07-28 13:17:12 +0200 |
---|---|---|
committer | Tony Wasserka <neobrainx@gmail.com> | 2015-07-28 13:17:12 +0200 |
commit | 62adb4ee7b69449aa2c9ac2a519b49b9d54f15fe (patch) | |
tree | 2abf715b8693863fd730852aa8cc485e034d0572 /src/core/hle | |
parent | Merge pull request #1001 from lioncash/arm (diff) | |
parent | Move input values into an array (diff) | |
download | yuzu-62adb4ee7b69449aa2c9ac2a519b49b9d54f15fe.tar yuzu-62adb4ee7b69449aa2c9ac2a519b49b9d54f15fe.tar.gz yuzu-62adb4ee7b69449aa2c9ac2a519b49b9d54f15fe.tar.bz2 yuzu-62adb4ee7b69449aa2c9ac2a519b49b9d54f15fe.tar.lz yuzu-62adb4ee7b69449aa2c9ac2a519b49b9d54f15fe.tar.xz yuzu-62adb4ee7b69449aa2c9ac2a519b49b9d54f15fe.tar.zst yuzu-62adb4ee7b69449aa2c9ac2a519b49b9d54f15fe.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 10 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.h | 5 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 70caa7d80..c35b13b25 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -35,6 +35,16 @@ static Kernel::SharedPtr<Kernel::Event> event_debug_pad; static u32 next_pad_index; static u32 next_touch_index; +const std::array<Service::HID::PadState, Settings::NativeInput::NUM_INPUTS> pad_mapping = { + Service::HID::PAD_A, Service::HID::PAD_B, Service::HID::PAD_X, Service::HID::PAD_Y, + Service::HID::PAD_L, Service::HID::PAD_R, Service::HID::PAD_ZL, Service::HID::PAD_ZR, + Service::HID::PAD_START, Service::HID::PAD_SELECT, Service::HID::PAD_NONE, + Service::HID::PAD_UP, Service::HID::PAD_DOWN, Service::HID::PAD_LEFT, Service::HID::PAD_RIGHT, + Service::HID::PAD_CIRCLE_UP, Service::HID::PAD_CIRCLE_DOWN, Service::HID::PAD_CIRCLE_LEFT, Service::HID::PAD_CIRCLE_RIGHT, + Service::HID::PAD_C_UP, Service::HID::PAD_C_DOWN, Service::HID::PAD_C_LEFT, Service::HID::PAD_C_RIGHT +}; + + // TODO(peachum): // Add a method for setting analog input from joystick device for the circle Pad. // diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index d50d479f8..517f4f2ae 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h @@ -9,7 +9,7 @@ #ifndef _MSC_VER #include <cstddef> #endif - +#include "core/settings.h" #include "common/bit_field.h" #include "common/common_funcs.h" #include "common/common_types.h" @@ -157,6 +157,9 @@ const PadState PAD_CIRCLE_LEFT = {{1u << 29}}; const PadState PAD_CIRCLE_UP = {{1u << 30}}; const PadState PAD_CIRCLE_DOWN = {{1u << 31}}; + +extern const std::array<Service::HID::PadState, Settings::NativeInput::NUM_INPUTS> pad_mapping; + /** * HID::GetIPCHandles service function * Inputs: |