diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-12-16 17:47:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-16 17:47:52 +0100 |
commit | a093f3d47a418e1eeb7ea091f4950bfd0e1ee028 (patch) | |
tree | 308fc4abe7b7e0a858690775deaef8551be3c282 /src/core/hle/service/set/device_settings.h | |
parent | Merge pull request #12237 from liamwhite/nce-sigtrap (diff) | |
parent | Make system settings persistent across boots (diff) | |
download | yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.gz yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.bz2 yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.lz yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.xz yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.zst yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.zip |
Diffstat (limited to 'src/core/hle/service/set/device_settings.h')
-rw-r--r-- | src/core/hle/service/set/device_settings.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/core/hle/service/set/device_settings.h b/src/core/hle/service/set/device_settings.h new file mode 100644 index 000000000..b6cfe04f2 --- /dev/null +++ b/src/core/hle/service/set/device_settings.h @@ -0,0 +1,53 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <array> + +#include "common/common_types.h" + +namespace Service::Set { +struct DeviceSettings { + std::array<u8, 0x10> reserved_000; + + // nn::settings::BatteryLot + std::array<u8, 0x18> ptm_battery_lot; + // nn::settings::system::PtmFuelGaugeParameter + std::array<u8, 0x18> ptm_fuel_gauge_parameter; + u8 ptm_battery_version; + // nn::settings::system::PtmCycleCountReliability + u32 ptm_cycle_count_reliability; + + std::array<u8, 0x48> reserved_048; + + // nn::settings::system::AnalogStickUserCalibration L + std::array<u8, 0x10> analog_user_stick_calibration_l; + // nn::settings::system::AnalogStickUserCalibration R + std::array<u8, 0x10> analog_user_stick_calibration_r; + + std::array<u8, 0x20> reserved_0B0; + + // nn::settings::system::ConsoleSixAxisSensorAccelerationBias + std::array<u8, 0xC> console_six_axis_sensor_acceleration_bias; + // nn::settings::system::ConsoleSixAxisSensorAngularVelocityBias + std::array<u8, 0xC> console_six_axis_sensor_angular_velocity_bias; + // nn::settings::system::ConsoleSixAxisSensorAccelerationGain + std::array<u8, 0x24> console_six_axis_sensor_acceleration_gain; + // nn::settings::system::ConsoleSixAxisSensorAngularVelocityGain + std::array<u8, 0x24> console_six_axis_sensor_angular_velocity_gain; + // nn::settings::system::ConsoleSixAxisSensorAngularVelocityTimeBias + std::array<u8, 0xC> console_six_axis_sensor_angular_velocity_time_bias; + // nn::settings::system::ConsoleSixAxisSensorAngularAcceleration + std::array<u8, 0x24> console_six_axis_sensor_angular_acceleration; +}; +static_assert(offsetof(DeviceSettings, ptm_battery_lot) == 0x10); +static_assert(offsetof(DeviceSettings, ptm_cycle_count_reliability) == 0x44); +static_assert(offsetof(DeviceSettings, analog_user_stick_calibration_l) == 0x90); +static_assert(offsetof(DeviceSettings, console_six_axis_sensor_acceleration_bias) == 0xD0); +static_assert(offsetof(DeviceSettings, console_six_axis_sensor_angular_acceleration) == 0x13C); +static_assert(sizeof(DeviceSettings) == 0x160, "DeviceSettings has the wrong size!"); + +DeviceSettings DefaultDeviceSettings(); + +} // namespace Service::Set |