aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordarktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>2024-04-05 01:58:30 +0200
committerBriar <205427297+icybriarr@users.noreply.github.com>2025-04-04 03:40:47 +0200
commitcacef3d8e7ff0e85290dd2869d21240ed24fec6e (patch)
treee3fb853f64feb59c6c2389939efab7c7817ca050 /src
parent2032d035a344cc6a6868ab3c6f0e7250b1f745ea (diff)
Ported some stubs from Suyu (2ba2db7795)
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/service/common_state_getter.cpp13
-rw-r--r--src/core/hle/service/am/service/common_state_getter.h1
-rw-r--r--src/core/hle/service/filesystem/fsp/fsp_srv.cpp10
-rw-r--r--src/core/hle/service/filesystem/fsp/fsp_srv.h1
-rw-r--r--src/core/hle/service/set/settings_types.h8
-rw-r--r--src/core/hle/service/set/system_settings_server.cpp11
-rw-r--r--src/core/hle/service/set/system_settings_server.h1
7 files changed, 42 insertions, 3 deletions
diff --git a/src/core/hle/service/am/service/common_state_getter.cpp b/src/core/hle/service/am/service/common_state_getter.cpp
index f523bcd9e6..f20071156e 100644
--- a/src/core/hle/service/am/service/common_state_getter.cpp
+++ b/src/core/hle/service/am/service/common_state_getter.cpp
@@ -38,7 +38,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr<Ap
{30, nullptr, "GetHomeButtonReaderLockAccessor"},
{31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"},
{32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"},
- {40, nullptr, "GetCradleFwVersion"},
+ {40, D<&ICommonStateGetter::GetCradleFwVersion>, "GetCradleFwVersion"},
{50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"},
{51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"},
{52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"},
@@ -159,6 +159,17 @@ Result ICommonStateGetter::GetBootMode(Out<PM::SystemBootMode> out_boot_mode) {
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) {
LOG_DEBUG(Service_AM, "called");
diff --git a/src/core/hle/service/am/service/common_state_getter.h b/src/core/hle/service/am/service/common_state_getter.h
index 59a46fa94f..2043a38ac6 100644
--- a/src/core/hle/service/am/service/common_state_getter.h
+++ b/src/core/hle/service/am/service/common_state_getter.h
@@ -37,6 +37,7 @@ private:
Result GetDefaultDisplayResolutionChangeEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetOperationMode(Out<OperationMode> out_operation_mode);
Result GetPerformanceMode(Out<APM::PerformanceMode> out_performance_mode);
+ Result GetCradleFwVersion(OutArray<uint32_t, 4> out_version);
Result GetBootMode(Out<PM::SystemBootMode> out_boot_mode);
Result IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled);
Result SetVrModeEnabled(bool is_vr_mode_enabled);
diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp
index 60290f1a6e..005caf6562 100644
--- a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp
@@ -67,7 +67,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"},
{25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"},
{26, nullptr, "FormatSdCardDryRun"},
- {27, nullptr, "IsExFatSupported"},
+ {27, D<&FSP_SRV::IsExFatSupported>, "IsExFatSupported"},
{28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"},
{30, nullptr, "OpenGameCardStorage"},
{31, nullptr, "OpenGameCardFileSystem"},
@@ -244,6 +244,14 @@ Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId(
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::OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface,
FileSys::SaveDataSpaceId space_id,
FileSys::SaveDataAttribute attribute) {
diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.h b/src/core/hle/service/filesystem/fsp/fsp_srv.h
index b565cace04..cd9d66b7ba 100644
--- a/src/core/hle/service/filesystem/fsp/fsp_srv.h
+++ b/src/core/hle/service/filesystem/fsp/fsp_srv.h
@@ -55,6 +55,7 @@ private:
FileSys::SaveDataAttribute save_struct, u128 uid);
Result CreateSaveDataFileSystemBySystemSaveDataId(
FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct);
+ Result IsExFatSupported(Out<bool> out_is_supported);
Result OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface,
FileSys::SaveDataSpaceId space_id,
FileSys::SaveDataAttribute attribute);
diff --git a/src/core/hle/service/set/settings_types.h b/src/core/hle/service/set/settings_types.h
index 92c2948b00..fddc1334cd 100644
--- a/src/core/hle/service/set/settings_types.h
+++ b/src/core/hle/service/set/settings_types.h
@@ -501,4 +501,12 @@ struct TvSettings {
};
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
diff --git a/src/core/hle/service/set/system_settings_server.cpp b/src/core/hle/service/set/system_settings_server.cpp
index 0dc8db8212..fe0948efa4 100644
--- a/src/core/hle/service/set/system_settings_server.cpp
+++ b/src/core/hle/service/set/system_settings_server.cpp
@@ -238,7 +238,7 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_)
{146, nullptr, "SetConsoleSixAxisSensorAngularVelocityTimeBias"},
{147, nullptr, "GetConsoleSixAxisSensorAngularAcceleration"},
{148, nullptr, "SetConsoleSixAxisSensorAngularAcceleration"},
- {149, nullptr, "GetRebootlessSystemUpdateVersion"},
+ {149, C<&ISystemSettingsServer::GetRebootlessSystemUpdateVersion>, "GetRebootlessSystemUpdateVersion"},
{150, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime>, "GetDeviceTimeZoneLocationUpdatedTime"},
{151, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationUpdatedTime>, "SetDeviceTimeZoneLocationUpdatedTime"},
{152, C<&ISystemSettingsServer::GetUserSystemClockAutomaticCorrectionUpdatedTime>, "GetUserSystemClockAutomaticCorrectionUpdatedTime"},
@@ -842,6 +842,15 @@ Result ISystemSettingsServer::SetQuestFlag(QuestFlag quest_flag) {
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::GetDeviceTimeZoneLocationName(
Out<Service::PSC::Time::LocationName> out_name) {
LOG_INFO(Service_SET, "called");
diff --git a/src/core/hle/service/set/system_settings_server.h b/src/core/hle/service/set/system_settings_server.h
index 993e5de7d0..0ec8b070d6 100644
--- a/src/core/hle/service/set/system_settings_server.h
+++ b/src/core/hle/service/set/system_settings_server.h
@@ -92,6 +92,7 @@ public:
Result SetSpeakerAutoMuteFlag(bool force_mute_on_headphone_removed);
Result GetQuestFlag(Out<QuestFlag> out_quest_flag);
Result SetQuestFlag(QuestFlag quest_flag);
+ Result GetRebootlessSystemUpdateVersion(Out<RebootlessSystemUpdateVersion> out_rebootless_system_update);
Result GetDeviceTimeZoneLocationName(Out<Service::PSC::Time::LocationName> out_name);
Result SetDeviceTimeZoneLocationName(const Service::PSC::Time::LocationName& name);
Result SetRegionCode(SystemRegionCode region_code);