diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-11-17 00:58:05 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-11-17 01:51:14 +0100 |
commit | 862e66202c1e612f56dad9bb0d9403b4af502178 (patch) | |
tree | 76d8d54e9874693467b66cd3d68cdbd4dc664cfa /src/core/hle/service/hid/hid_firmware_settings.h | |
parent | service: hid: Implement xpad calls (diff) | |
download | yuzu-862e66202c1e612f56dad9bb0d9403b4af502178.tar yuzu-862e66202c1e612f56dad9bb0d9403b4af502178.tar.gz yuzu-862e66202c1e612f56dad9bb0d9403b4af502178.tar.bz2 yuzu-862e66202c1e612f56dad9bb0d9403b4af502178.tar.lz yuzu-862e66202c1e612f56dad9bb0d9403b4af502178.tar.xz yuzu-862e66202c1e612f56dad9bb0d9403b4af502178.tar.zst yuzu-862e66202c1e612f56dad9bb0d9403b4af502178.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/hid_firmware_settings.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/hid_firmware_settings.h b/src/core/hle/service/hid/hid_firmware_settings.h new file mode 100644 index 000000000..6c10c440b --- /dev/null +++ b/src/core/hle/service/hid/hid_firmware_settings.h @@ -0,0 +1,54 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include "common/common_types.h" + +namespace Service::HID { + +/// Loads firmware config from nn::settings::fwdbg +class HidFirmwareSettings { +public: + using FirmwareSetting = std::array<u8, 4>; + using FeaturesPerId = std::array<bool, 0xA8>; + + HidFirmwareSettings(); + + void Reload(); + void LoadSettings(bool reload_config); + + bool IsDebugPadEnabled(); + bool IsDeviceManaged(); + bool IsEmulateFutureDevice(); + bool IsTouchI2cManaged(); + bool IsHandheldForced(); + bool IsRailEnabled(); + bool IsHardwareErrorEmulated(); + bool IsBleDisabled(); + bool IsDscaleDisabled(); + bool IsTouchAutoUpdateDisabled(); + + FirmwareSetting GetFirmwareUpdateFailure(); + FeaturesPerId FeaturesDisabledPerId(); + +private: + bool is_initalized{}; + + // Debug settings + bool is_debug_pad_enabled{}; + bool is_device_managed{}; + bool is_touch_i2c_managed{}; + bool is_future_devices_emulated{}; + bool is_mcu_hardware_error_emulated{}; + bool is_rail_enabled{}; + bool is_firmware_update_failure_emulated{}; + bool is_ble_disabled{}; + bool is_dscale_disabled{}; + bool is_handheld_forced{}; + bool is_touch_firmware_auto_update_disabled{}; + FirmwareSetting is_firmware_update_failure{}; + FeaturesPerId features_per_id_disabled{}; +}; + +} // namespace Service::HID |