From de4b93d147b466b343b69d3b52c7243c2fd78c56 Mon Sep 17 00:00:00 2001 From: Collecting Date: Fri, 31 Oct 2025 05:41:29 +0000 Subject: [PATCH] feat: Toggle Gyro for Controller Overlay Signed-off-by: Collecting --- src/hid_core/frontend/emulated_controller.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/hid_core/frontend/emulated_controller.h b/src/hid_core/frontend/emulated_controller.h index 85370a736..f51593e54 100644 --- a/src/hid_core/frontend/emulated_controller.h +++ b/src/hid_core/frontend/emulated_controller.h @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -129,6 +130,8 @@ struct ControllerStatus { CameraValues camera_values{}; RingAnalogValue ring_analog_value{}; NfcValues nfc_values{}; + u32 body_color{}; + bool gyro_overlay_visible{}; // Data for HID services HomeButtonState home_button_state{}; @@ -274,6 +277,12 @@ public: // Returns the current mapped motion device Common::ParamPackage GetMotionParam(std::size_t index) const; + // Returns the custom body color for the controller + u32 GetBodyColor() const; + + // Returns whether the gyro overlay is visible within Controller Overlay. + bool IsGyroOverlayVisible() const; + /** * Updates the current mapped button device * @param param ParamPackage with controller data to be mapped @@ -292,6 +301,18 @@ public: */ void SetMotionParam(std::size_t index, Common::ParamPackage param); + /** + * Sets the custom body color for the controller + * @param color The RGB color value to set + */ + void SetBodyColor(u32 color); + + /** + * Sets the visibility of the gyro overlay + * @param visible The visibility state to set + */ + void SetGyroOverlayVisible(bool visible); + /// Auto calibrates the current motion devices void StartMotionCalibration();