kraken: Address comments from review

start lion review
This commit is contained in:
german77 2021-10-30 22:23:10 -05:00 committed by Narr the Reg
parent 61d9eb9f69
commit 2b1b0c2a30
31 changed files with 534 additions and 466 deletions

View file

@ -13,9 +13,6 @@
namespace Service::HID {
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x00000;
constexpr s32 HID_JOYSTICK_MAX = 0x7fff;
[[maybe_unused]] constexpr s32 HID_JOYSTICK_MIN = -0x7fff;
enum class JoystickId : std::size_t { Joystick_Left, Joystick_Right };
Controller_DebugPad::Controller_DebugPad(Core::System& system_) : ControllerBase{system_} {
controller = system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Other);

View file

@ -12,7 +12,6 @@
namespace Service::HID {
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800;
constexpr u8 KEYS_PER_BYTE = 8;
Controller_Keyboard::Controller_Keyboard(Core::System& system_) : ControllerBase{system_} {
emulated_devices = system.HIDCore().GetEmulatedDevices();

View file

@ -403,8 +403,7 @@ private:
AppletFooterUiType type;
INSERT_PADDING_BYTES(0x5B); // Reserved
};
static_assert(sizeof(AppletFooterUi) == 0x60,
"AppletFooterUi is an invalid size");
static_assert(sizeof(AppletFooterUi) == 0x60, "AppletFooterUi is an invalid size");
// This is nn::hid::NpadLarkType
enum class NpadLarkType : u32 {

View file

@ -4,6 +4,8 @@
#pragma once
#include <array>
#include "common/common_types.h"
#include "common/swap.h"
@ -29,10 +31,10 @@ struct Lifo {
}
const AtomicStorage<State>& ReadPreviousEntry() const {
return entries[GetPreviuousEntryIndex()];
return entries[GetPreviousEntryIndex()];
}
std::size_t GetPreviuousEntryIndex() const {
std::size_t GetPreviousEntryIndex() const {
return (buffer_tail + total_buffer_count - 1) % total_buffer_count;
}