Implemented some stubs for Health & Safety and corrected GetGroupInfo behavior

This commit is contained in:
niansa 2024-03-10 02:26:03 +01:00 committed by JuanCStar
parent 796ca02437
commit 2ba2db7795
10 changed files with 47 additions and 7 deletions

View file

@ -38,7 +38,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr<Ap
{30, nullptr, "GetHomeButtonReaderLockAccessor"}, {30, nullptr, "GetHomeButtonReaderLockAccessor"},
{31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"}, {31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"},
{32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"}, {32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"},
{40, nullptr, "GetCradleFwVersion"}, {40, D<&ICommonStateGetter::GetCradleFwVersion>, "GetCradleFwVersion"},
{50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"}, {50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"},
{51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"}, {51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"},
{52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"}, {52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"},
@ -159,6 +159,18 @@ Result ICommonStateGetter::GetBootMode(Out<PM::SystemBootMode> out_boot_mode) {
R_SUCCEED(); R_SUCCEED();
} }
Result ICommonStateGetter::GetCradleFwVersion(OutArray<uint32_t, 4> out_version) {
LOG_DEBUG(Service_AM, "(STUBBED) called");
out_version[0] = 0;
out_version[1] = 0;
out_version[2] = 0;
out_version[3] = 0;
R_SUCCEED();
}
Result ICommonStateGetter::IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled) { Result ICommonStateGetter::IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled) {
LOG_DEBUG(Service_AM, "called"); LOG_DEBUG(Service_AM, "called");

View file

@ -38,6 +38,7 @@ private:
Result GetOperationMode(Out<OperationMode> out_operation_mode); Result GetOperationMode(Out<OperationMode> out_operation_mode);
Result GetPerformanceMode(Out<APM::PerformanceMode> out_performance_mode); Result GetPerformanceMode(Out<APM::PerformanceMode> out_performance_mode);
Result GetBootMode(Out<PM::SystemBootMode> out_boot_mode); Result GetBootMode(Out<PM::SystemBootMode> out_boot_mode);
Result GetCradleFwVersion(OutArray<uint32_t, 4> out_version);
Result IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled); Result IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled);
Result SetVrModeEnabled(bool is_vr_mode_enabled); Result SetVrModeEnabled(bool is_vr_mode_enabled);
Result SetLcdBacklighOffEnabled(bool is_lcd_backlight_off_enabled); Result SetLcdBacklighOffEnabled(bool is_lcd_backlight_off_enabled);

View file

@ -67,7 +67,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"}, {24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"},
{25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"}, {25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"},
{26, nullptr, "FormatSdCardDryRun"}, {26, nullptr, "FormatSdCardDryRun"},
{27, nullptr, "IsExFatSupported"}, {27, D<&FSP_SRV::IsExFatSupported>, "IsExFatSupported"},
{28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"}, {28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"},
{30, nullptr, "OpenGameCardStorage"}, {30, nullptr, "OpenGameCardStorage"},
{31, nullptr, "OpenGameCardFileSystem"}, {31, nullptr, "OpenGameCardFileSystem"},
@ -235,6 +235,14 @@ Result FSP_SRV::CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_crea
save_struct)); save_struct));
} }
Result FSP_SRV::IsExFatSupported(Out<bool> out_is_supported) {
LOG_WARNING(Service_FS, "(STUBBED) called");
*out_is_supported = true;
R_SUCCEED();
}
Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId( Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId(
FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct) { FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct) {
LOG_DEBUG(Service_FS, "called save_struct = {}", save_struct.DebugInfo()); LOG_DEBUG(Service_FS, "called save_struct = {}", save_struct.DebugInfo());

View file

@ -53,6 +53,7 @@ private:
Result OpenSdCardFileSystem(OutInterface<IFileSystem> out_interface); Result OpenSdCardFileSystem(OutInterface<IFileSystem> out_interface);
Result CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_create_struct, Result CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_create_struct,
FileSys::SaveDataAttribute save_struct, u128 uid); FileSys::SaveDataAttribute save_struct, u128 uid);
Result IsExFatSupported(Out<bool> out_is_supported);
Result CreateSaveDataFileSystemBySystemSaveDataId( Result CreateSaveDataFileSystemBySystemSaveDataId(
FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct); FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct);
Result OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface, Result OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface,

View file

@ -29,11 +29,11 @@ Result ISfMonitorService::Initialize(Out<u32> out_value) {
R_SUCCEED(); R_SUCCEED();
} }
Result ISfMonitorService::GetGroupInfo( Result ISfMonitorService::GetGroupInfo(GroupInfo in_group_info,
OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info) { OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info) {
LOG_WARNING(Service_LDN, "(STUBBED) called"); LOG_WARNING(Service_LDN, "(STUBBED) called");
*out_group_info = GroupInfo{}; memcpy(out_group_info, &in_group_info, sizeof(GroupInfo));
R_SUCCEED(); R_SUCCEED();
} }

View file

@ -20,7 +20,7 @@ public:
private: private:
Result Initialize(Out<u32> out_value); Result Initialize(Out<u32> out_value);
Result GetGroupInfo(OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info); Result GetGroupInfo(GroupInfo in_group_info, OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info);
}; };
} // namespace Service::LDN } // namespace Service::LDN

View file

@ -507,7 +507,7 @@ void IGeneralService::GetCurrentIpConfigInfo(HLERequestContext& ctx) {
} }
void IGeneralService::IsWirelessCommunicationEnabled(HLERequestContext& ctx) { void IGeneralService::IsWirelessCommunicationEnabled(HLERequestContext& ctx) {
LOG_WARNING(Service_NIFM, "(STUBBED) called"); LOG_WARNING(Service_NIFM, "called");
IPC::ResponseBuilder rb{ctx, 3}; IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess); rb.Push(ResultSuccess);

View file

@ -509,4 +509,12 @@ struct TvSettings {
}; };
static_assert(sizeof(TvSettings) == 0x20, "TvSettings is an invalid size"); static_assert(sizeof(TvSettings) == 0x20, "TvSettings is an invalid size");
/// This is nn::settings::system::RebootlessSystemUpdateVersion
struct RebootlessSystemUpdateVersion {
u32 version;
u8 reserved[0x1c];
char display_version[0x20];
};
static_assert(sizeof(RebootlessSystemUpdateVersion) == 0x40, "RebootlessSystemUpdateVersion is an invalid size");
} // namespace Service::Set } // namespace Service::Set

View file

@ -238,7 +238,7 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_)
{146, nullptr, "SetConsoleSixAxisSensorAngularVelocityTimeBias"}, {146, nullptr, "SetConsoleSixAxisSensorAngularVelocityTimeBias"},
{147, nullptr, "GetConsoleSixAxisSensorAngularAcceleration"}, {147, nullptr, "GetConsoleSixAxisSensorAngularAcceleration"},
{148, nullptr, "SetConsoleSixAxisSensorAngularAcceleration"}, {148, nullptr, "SetConsoleSixAxisSensorAngularAcceleration"},
{149, nullptr, "GetRebootlessSystemUpdateVersion"}, {149, C<&ISystemSettingsServer::GetRebootlessSystemUpdateVersion>, "GetRebootlessSystemUpdateVersion"},
{150, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime>, "GetDeviceTimeZoneLocationUpdatedTime"}, {150, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime>, "GetDeviceTimeZoneLocationUpdatedTime"},
{151, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationUpdatedTime>, "SetDeviceTimeZoneLocationUpdatedTime"}, {151, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationUpdatedTime>, "SetDeviceTimeZoneLocationUpdatedTime"},
{152, C<&ISystemSettingsServer::GetUserSystemClockAutomaticCorrectionUpdatedTime>, "GetUserSystemClockAutomaticCorrectionUpdatedTime"}, {152, C<&ISystemSettingsServer::GetUserSystemClockAutomaticCorrectionUpdatedTime>, "GetUserSystemClockAutomaticCorrectionUpdatedTime"},
@ -1194,6 +1194,15 @@ Result ISystemSettingsServer::SetKeyboardLayout(KeyboardLayout keyboard_layout)
R_SUCCEED(); R_SUCCEED();
} }
Result ISystemSettingsServer::GetRebootlessSystemUpdateVersion(Out<RebootlessSystemUpdateVersion> out_rebootless_system_update) {
LOG_INFO(Service_SET, "(STUBBED) called");
out_rebootless_system_update->version = 0;
strcpy(out_rebootless_system_update->display_version, "0.0.0");
R_SUCCEED();
}
Result ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime( Result ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime(
Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point) { Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point) {
LOG_INFO(Service_SET, "called"); LOG_INFO(Service_SET, "called");

View file

@ -136,6 +136,7 @@ public:
Result SetAppletLaunchFlags(u32 applet_launch_flag); Result SetAppletLaunchFlags(u32 applet_launch_flag);
Result GetKeyboardLayout(Out<KeyboardLayout> out_keyboard_layout); Result GetKeyboardLayout(Out<KeyboardLayout> out_keyboard_layout);
Result SetKeyboardLayout(KeyboardLayout keyboard_layout); Result SetKeyboardLayout(KeyboardLayout keyboard_layout);
Result GetRebootlessSystemUpdateVersion(Out<RebootlessSystemUpdateVersion> out_rebootless_system_update);
Result GetDeviceTimeZoneLocationUpdatedTime( Result GetDeviceTimeZoneLocationUpdatedTime(
Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point); Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point);
Result SetDeviceTimeZoneLocationUpdatedTime( Result SetDeviceTimeZoneLocationUpdatedTime(