mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
Merge pull request #722 from lioncash/signed
hid: Resolve a signed/unsigned comparison warning
This commit is contained in:
commit
f43d8ea523
2 changed files with 4 additions and 8 deletions
|
@ -85,8 +85,7 @@ private:
|
||||||
controller_header.left_color_buttons = JOYCON_BUTTONS_NEON_BLUE;
|
controller_header.left_color_buttons = JOYCON_BUTTONS_NEON_BLUE;
|
||||||
|
|
||||||
for (size_t controller = 0; controller < mem.controllers.size(); controller++) {
|
for (size_t controller = 0; controller < mem.controllers.size(); controller++) {
|
||||||
for (int index = 0; index < HID_NUM_LAYOUTS; index++) {
|
for (auto& layout : mem.controllers[controller].layouts) {
|
||||||
ControllerLayout& layout = mem.controllers[controller].layouts[index];
|
|
||||||
layout.header.num_entries = HID_NUM_ENTRIES;
|
layout.header.num_entries = HID_NUM_ENTRIES;
|
||||||
layout.header.max_entry_index = HID_NUM_ENTRIES - 1;
|
layout.header.max_entry_index = HID_NUM_ENTRIES - 1;
|
||||||
|
|
||||||
|
@ -213,8 +212,7 @@ private:
|
||||||
keyboard.entries[curr_keyboard_entry].timestamp_2 = keyboard_sample_counter;
|
keyboard.entries[curr_keyboard_entry].timestamp_2 = keyboard_sample_counter;
|
||||||
|
|
||||||
// TODO(shinyquagsire23): Figure out what any of these are
|
// TODO(shinyquagsire23): Figure out what any of these are
|
||||||
for (size_t i = 0; i < mem.unk_input_1.size(); i++) {
|
for (auto& input : mem.unk_input_1) {
|
||||||
UnkInput1& input = mem.unk_input_1[i];
|
|
||||||
const u64 last_input_entry = input.header.latest_entry;
|
const u64 last_input_entry = input.header.latest_entry;
|
||||||
const u64 curr_input_entry = (input.header.latest_entry + 1) % input.entries.size();
|
const u64 curr_input_entry = (input.header.latest_entry + 1) % input.entries.size();
|
||||||
const u64 input_sample_counter = input.entries[last_input_entry].timestamp + 1;
|
const u64 input_sample_counter = input.entries[last_input_entry].timestamp + 1;
|
||||||
|
@ -228,9 +226,7 @@ private:
|
||||||
input.entries[curr_input_entry].timestamp_2 = input_sample_counter;
|
input.entries[curr_input_entry].timestamp_2 = input_sample_counter;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < mem.unk_input_2.size(); i++) {
|
for (auto& input : mem.unk_input_2) {
|
||||||
UnkInput2& input = mem.unk_input_2[i];
|
|
||||||
|
|
||||||
input.header.timestamp_ticks = timestamp;
|
input.header.timestamp_ticks = timestamp;
|
||||||
input.header.num_entries = 17;
|
input.header.num_entries = 17;
|
||||||
input.header.latest_entry = 0;
|
input.header.latest_entry = 0;
|
||||||
|
|
|
@ -380,7 +380,7 @@ static_assert(sizeof(ControllerLayout) == 0x350,
|
||||||
|
|
||||||
struct Controller {
|
struct Controller {
|
||||||
ControllerHeader header;
|
ControllerHeader header;
|
||||||
std::array<ControllerLayout, 7> layouts;
|
std::array<ControllerLayout, HID_NUM_LAYOUTS> layouts;
|
||||||
std::array<u8, 0x2a70> unk_1;
|
std::array<u8, 0x2a70> unk_1;
|
||||||
ControllerMAC mac_left;
|
ControllerMAC mac_left;
|
||||||
ControllerMAC mac_right;
|
ControllerMAC mac_right;
|
||||||
|
|
Loading…
Reference in a new issue