mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-18 22:18:04 -05:00
kraken: Address comments from review
Fix compiler bug
This commit is contained in:
@ -564,8 +564,9 @@ struct MouseState {
|
||||
s32 y;
|
||||
s32 delta_x;
|
||||
s32 delta_y;
|
||||
s32 delta_wheel_x;
|
||||
// Axis Order in HW is switched for the wheel
|
||||
s32 delta_wheel_y;
|
||||
s32 delta_wheel_x;
|
||||
MouseButton button;
|
||||
MouseAttribute attribute;
|
||||
};
|
||||
|
@ -345,7 +345,7 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) {
|
||||
constexpr btn right_button_mask = btn::A | btn::B | btn::X | btn::Y | btn::StickR | btn::R |
|
||||
btn::ZR | btn::Plus | btn::StickRLeft | btn::StickRUp |
|
||||
btn::StickRRight | btn::StickRDown;
|
||||
pad_entry.npad_buttons.raw |= button_state.raw & right_button_mask;
|
||||
pad_entry.npad_buttons.raw = button_state.raw & right_button_mask;
|
||||
pad_entry.r_stick = stick_state.right;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <array>
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "common/swap.h"
|
||||
|
||||
namespace Service::HID {
|
||||
constexpr std::size_t max_buffer_size = 17;
|
||||
@ -21,7 +20,7 @@ struct AtomicStorage {
|
||||
template <typename State>
|
||||
struct Lifo {
|
||||
s64 timestamp{};
|
||||
s64 total_buffer_count = max_buffer_size;
|
||||
s64 total_buffer_count = static_cast<s64>(max_buffer_size);
|
||||
s64 buffer_tail{};
|
||||
s64 buffer_count{};
|
||||
std::array<AtomicStorage<State>, max_buffer_size> entries{};
|
||||
@ -35,11 +34,11 @@ struct Lifo {
|
||||
}
|
||||
|
||||
std::size_t GetPreviousEntryIndex() const {
|
||||
return (buffer_tail + total_buffer_count - 1) % total_buffer_count;
|
||||
return static_cast<size_t>((buffer_tail + total_buffer_count - 1) % total_buffer_count);
|
||||
}
|
||||
|
||||
std::size_t GetNextEntryIndex() const {
|
||||
return (buffer_tail + 1) % total_buffer_count;
|
||||
return static_cast<size_t>((buffer_tail + 1) % total_buffer_count);
|
||||
}
|
||||
|
||||
void WriteNextEntry(const State& new_state) {
|
||||
|
Reference in New Issue
Block a user