summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-12-24 02:41:51 +0100
committerbunnei <bunneidev@gmail.com>2014-12-24 02:41:51 +0100
commit2bbbe68399c6252c4d88a3ae650bec592c96d3b1 (patch)
tree5220733e06bbc4b6f5c3951e63b048ce5ee6a389 /src/core
parentUpdate README.md (fix typo) (diff)
parentStubbed IsSdmcWriteable to always return writeable. (diff)
downloadyuzu-2bbbe68399c6252c4d88a3ae650bec592c96d3b1.tar
yuzu-2bbbe68399c6252c4d88a3ae650bec592c96d3b1.tar.gz
yuzu-2bbbe68399c6252c4d88a3ae650bec592c96d3b1.tar.bz2
yuzu-2bbbe68399c6252c4d88a3ae650bec592c96d3b1.tar.lz
yuzu-2bbbe68399c6252c4d88a3ae650bec592c96d3b1.tar.xz
yuzu-2bbbe68399c6252c4d88a3ae650bec592c96d3b1.tar.zst
yuzu-2bbbe68399c6252c4d88a3ae650bec592c96d3b1.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/fs/fs_user.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp
index 5e9b85cc7..957185f8f 100644
--- a/src/core/hle/service/fs/fs_user.cpp
+++ b/src/core/hle/service/fs/fs_user.cpp
@@ -426,6 +426,23 @@ static void IsSdmcDetected(Service::Interface* self) {
}
/**
+ * FS_User::IsSdmcWriteable service function
+ * Outputs:
+ * 0 : Command header 0x08180000
+ * 1 : Result of function, 0 on success, otherwise error code
+ * 2 : Whether the Sdmc is currently writeable
+ */
+static void IsSdmcWriteable(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+ // If the SD isn't enabled, it can't be writeable...else, stubbed true
+ cmd_buff[2] = Settings::values.use_virtual_sd ? 1 : 0;
+
+ LOG_DEBUG(Service_FS, " (STUBBED)");
+}
+
+/**
* FS_User::FormatSaveData service function,
* formats the SaveData specified by the input path.
* Inputs:
@@ -510,7 +527,7 @@ const FSUserInterface::FunctionInfo FunctionTable[] = {
{0x08150000, nullptr, "GetNandArchiveResource"},
{0x08160000, nullptr, "GetSdmcFatfsErro"},
{0x08170000, IsSdmcDetected, "IsSdmcDetected"},
- {0x08180000, nullptr, "IsSdmcWritable"},
+ {0x08180000, IsSdmcWriteable, "IsSdmcWritable"},
{0x08190042, nullptr, "GetSdmcCid"},
{0x081A0042, nullptr, "GetNandCid"},
{0x081B0000, nullptr, "GetSdmcSpeedInfo"},