From 46ec3c7aebba250139f6b205174df2c295351ab4 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 19 Nov 2022 18:47:06 +0100 Subject: [PATCH] early-access version 3131 --- README.md | 2 +- src/core/hid/emulated_console.cpp | 12 ++++++------ src/core/hid/emulated_console.h | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6977601f9..13ece752c 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3130. +This is the source code for early-access 3131. ## Legal Notice diff --git a/src/core/hid/emulated_console.cpp b/src/core/hid/emulated_console.cpp index aa235afc2..525ab57ce 100755 --- a/src/core/hid/emulated_console.cpp +++ b/src/core/hid/emulated_console.cpp @@ -31,7 +31,7 @@ void EmulatedConsole::SetTouchParams() { touch_params[index++] = Common::ParamPackage{"engine:cemuhookudp,axis_x:19,axis_y:20,button:131072"}; - for (int i = 0; i < static_cast(max_active_touch_inputs); i++) { + for (int i = 0; i < static_cast(MaxActiveTouchInputs); i++) { Common::ParamPackage touchscreen_param{}; touchscreen_param.Set("engine", "touch"); touchscreen_param.Set("axis_x", i * 2); @@ -46,7 +46,7 @@ void EmulatedConsole::SetTouchParams() { // Map the rest of the fingers from touch from button configuration for (const auto& config_entry : touch_buttons) { - if (index >= max_touch_devices) { + if (index >= MaxTouchDevices) { continue; } Common::ParamPackage params{config_entry}; @@ -176,7 +176,7 @@ void EmulatedConsole::SetMotion(const Common::Input::CallbackStatus& callback) { } void EmulatedConsole::SetTouch(const Common::Input::CallbackStatus& callback, std::size_t index) { - if (index >= max_touch_devices) { + if (index >= MaxTouchDevices) { return; } std::unique_lock lock{mutex}; @@ -216,7 +216,7 @@ void EmulatedConsole::SetTouch(const Common::Input::CallbackStatus& callback, st } // Touch outside allowed range. Ignore input - if (touch_index.value() >= max_active_touch_inputs) { + if (touch_index.value() >= MaxActiveTouchInputs) { return; } @@ -251,7 +251,7 @@ TouchFingerState EmulatedConsole::GetTouch() const { } std::optional EmulatedConsole::GetIndexFromFingerId(std::size_t finger_id) const { - for (std::size_t index = 0; index < max_touch_devices; ++index) { + for (std::size_t index = 0; index < MaxTouchDevices; ++index) { const auto& finger = console.touch_values[index]; if (!finger.pressed.value) { continue; @@ -264,7 +264,7 @@ std::optional EmulatedConsole::GetIndexFromFingerId(std::size_t fin } std::optional EmulatedConsole::GetNextFreeIndex() const { - for (std::size_t index = 0; index < max_touch_devices; ++index) { + for (std::size_t index = 0; index < MaxTouchDevices; ++index) { if (!console.touch_values[index].pressed.value) { return index; } diff --git a/src/core/hid/emulated_console.h b/src/core/hid/emulated_console.h index dd8085230..698797ecd 100755 --- a/src/core/hid/emulated_console.h +++ b/src/core/hid/emulated_console.h @@ -21,8 +21,8 @@ #include "core/hid/motion_input.h" namespace Core::HID { -static constexpr std::size_t max_touch_devices = 32; -static constexpr std::size_t max_active_touch_inputs = 16; +static constexpr std::size_t MaxTouchDevices = 32; +static constexpr std::size_t MaxActiveTouchInputs = 16; struct ConsoleMotionInfo { Common::Input::MotionStatus raw_status{}; @@ -30,13 +30,13 @@ struct ConsoleMotionInfo { }; using ConsoleMotionDevices = std::unique_ptr; -using TouchDevices = std::array, max_touch_devices>; +using TouchDevices = std::array, MaxTouchDevices>; using ConsoleMotionParams = Common::ParamPackage; -using TouchParams = std::array; +using TouchParams = std::array; using ConsoleMotionValues = ConsoleMotionInfo; -using TouchValues = std::array; +using TouchValues = std::array; struct TouchFinger { u64 last_touch{}; @@ -58,7 +58,7 @@ struct ConsoleMotion { bool is_at_rest{}; }; -using TouchFingerState = std::array; +using TouchFingerState = std::array; struct ConsoleStatus { // Data from input_common