diff options
| author | 2021-10-30 22:23:10 -0500 | |
|---|---|---|
| committer | 2021-11-24 20:30:26 -0600 | |
| commit | 2b1b0c2a30e242b08ec120e09803ec54d5445703 (patch) | |
| tree | 9a10400a7e4403b288eee3aae8a52f1d5be912de /src/core/hle | |
| parent | input_common: Revert deleted TAS functions (diff) | |
| download | yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.gz yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.xz yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.zip | |
kraken: Address comments from review
start lion review
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/hid/controllers/debug_pad.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/keyboard.cpp | 1 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/npad.h | 3 | ||||
| -rw-r--r-- | src/core/hle/service/hid/ring_lifo.h | 6 |
4 files changed, 5 insertions, 8 deletions
diff --git a/src/core/hle/service/hid/controllers/debug_pad.cpp b/src/core/hle/service/hid/controllers/debug_pad.cpp index 345134357..b009ed086 100644 --- a/src/core/hle/service/hid/controllers/debug_pad.cpp +++ b/src/core/hle/service/hid/controllers/debug_pad.cpp | |||
| @@ -13,9 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | namespace Service::HID { | 14 | namespace Service::HID { |
| 15 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x00000; | 15 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x00000; |
| 16 | constexpr s32 HID_JOYSTICK_MAX = 0x7fff; | ||
| 17 | [[maybe_unused]] constexpr s32 HID_JOYSTICK_MIN = -0x7fff; | ||
| 18 | enum class JoystickId : std::size_t { Joystick_Left, Joystick_Right }; | ||
| 19 | 16 | ||
| 20 | Controller_DebugPad::Controller_DebugPad(Core::System& system_) : ControllerBase{system_} { | 17 | Controller_DebugPad::Controller_DebugPad(Core::System& system_) : ControllerBase{system_} { |
| 21 | controller = system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Other); | 18 | controller = system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Other); |
diff --git a/src/core/hle/service/hid/controllers/keyboard.cpp b/src/core/hle/service/hid/controllers/keyboard.cpp index f4d49965f..60dc62f2c 100644 --- a/src/core/hle/service/hid/controllers/keyboard.cpp +++ b/src/core/hle/service/hid/controllers/keyboard.cpp | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | 12 | ||
| 13 | namespace Service::HID { | 13 | namespace Service::HID { |
| 14 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800; | 14 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800; |
| 15 | constexpr u8 KEYS_PER_BYTE = 8; | ||
| 16 | 15 | ||
| 17 | Controller_Keyboard::Controller_Keyboard(Core::System& system_) : ControllerBase{system_} { | 16 | Controller_Keyboard::Controller_Keyboard(Core::System& system_) : ControllerBase{system_} { |
| 18 | emulated_devices = system.HIDCore().GetEmulatedDevices(); | 17 | emulated_devices = system.HIDCore().GetEmulatedDevices(); |
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index af4934c55..4a9c9cc1a 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h | |||
| @@ -403,8 +403,7 @@ private: | |||
| 403 | AppletFooterUiType type; | 403 | AppletFooterUiType type; |
| 404 | INSERT_PADDING_BYTES(0x5B); // Reserved | 404 | INSERT_PADDING_BYTES(0x5B); // Reserved |
| 405 | }; | 405 | }; |
| 406 | static_assert(sizeof(AppletFooterUi) == 0x60, | 406 | static_assert(sizeof(AppletFooterUi) == 0x60, "AppletFooterUi is an invalid size"); |
| 407 | "AppletFooterUi is an invalid size"); | ||
| 408 | 407 | ||
| 409 | // This is nn::hid::NpadLarkType | 408 | // This is nn::hid::NpadLarkType |
| 410 | enum class NpadLarkType : u32 { | 409 | enum class NpadLarkType : u32 { |
diff --git a/src/core/hle/service/hid/ring_lifo.h b/src/core/hle/service/hid/ring_lifo.h index 382350a2d..6209ed0d1 100644 --- a/src/core/hle/service/hid/ring_lifo.h +++ b/src/core/hle/service/hid/ring_lifo.h | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <array> | ||
| 8 | |||
| 7 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 8 | #include "common/swap.h" | 10 | #include "common/swap.h" |
| 9 | 11 | ||
| @@ -29,10 +31,10 @@ struct Lifo { | |||
| 29 | } | 31 | } |
| 30 | 32 | ||
| 31 | const AtomicStorage<State>& ReadPreviousEntry() const { | 33 | const AtomicStorage<State>& ReadPreviousEntry() const { |
| 32 | return entries[GetPreviuousEntryIndex()]; | 34 | return entries[GetPreviousEntryIndex()]; |
| 33 | } | 35 | } |
| 34 | 36 | ||
| 35 | std::size_t GetPreviuousEntryIndex() const { | 37 | std::size_t GetPreviousEntryIndex() const { |
| 36 | return (buffer_tail + total_buffer_count - 1) % total_buffer_count; | 38 | return (buffer_tail + total_buffer_count - 1) % total_buffer_count; |
| 37 | } | 39 | } |
| 38 | 40 | ||