diff options
| -rw-r--r-- | src/core/hle/service/fs_user.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/service/fs_user.cpp b/src/core/hle/service/fs_user.cpp index 012174321..845c94103 100644 --- a/src/core/hle/service/fs_user.cpp +++ b/src/core/hle/service/fs_user.cpp | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include "common/common.h" | 5 | #include "common/common.h" |
| 6 | 6 | ||
| 7 | #include "fs_user.h" | 7 | #include "fs_user.h" |
| 8 | #include "core/settings.h" | ||
| 8 | #include "core/hle/kernel/archive.h" | 9 | #include "core/hle/kernel/archive.h" |
| 9 | 10 | ||
| 10 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 11 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| @@ -200,6 +201,21 @@ void OpenArchive(Service::Interface* self) { | |||
| 200 | DEBUG_LOG(KERNEL, "called"); | 201 | DEBUG_LOG(KERNEL, "called"); |
| 201 | } | 202 | } |
| 202 | 203 | ||
| 204 | /* | ||
| 205 | * FS_User::IsSdmcDetected service function | ||
| 206 | * Outputs: | ||
| 207 | * 1 : Result of function, 0 on success, otherwise error code | ||
| 208 | * 2 : Whether the Sdmc could be detected | ||
| 209 | */ | ||
| 210 | void IsSdmcDetected(Service::Interface* self) { | ||
| 211 | u32* cmd_buff = Service::GetCommandBuffer(); | ||
| 212 | |||
| 213 | cmd_buff[1] = 0; | ||
| 214 | cmd_buff[2] = Settings::values.use_virtual_sd ? 1 : 0; | ||
| 215 | |||
| 216 | DEBUG_LOG(KERNEL, "called"); | ||
| 217 | } | ||
| 218 | |||
| 203 | const Interface::FunctionInfo FunctionTable[] = { | 219 | const Interface::FunctionInfo FunctionTable[] = { |
| 204 | {0x000100C6, nullptr, "Dummy1"}, | 220 | {0x000100C6, nullptr, "Dummy1"}, |
| 205 | {0x040100C4, nullptr, "Control"}, | 221 | {0x040100C4, nullptr, "Control"}, |
| @@ -225,7 +241,7 @@ const Interface::FunctionInfo FunctionTable[] = { | |||
| 225 | {0x08140000, nullptr, "GetSdmcArchiveResource"}, | 241 | {0x08140000, nullptr, "GetSdmcArchiveResource"}, |
| 226 | {0x08150000, nullptr, "GetNandArchiveResource"}, | 242 | {0x08150000, nullptr, "GetNandArchiveResource"}, |
| 227 | {0x08160000, nullptr, "GetSdmcFatfsErro"}, | 243 | {0x08160000, nullptr, "GetSdmcFatfsErro"}, |
| 228 | {0x08170000, nullptr, "IsSdmcDetected"}, | 244 | {0x08170000, IsSdmcDetected, "IsSdmcDetected"}, |
| 229 | {0x08180000, nullptr, "IsSdmcWritable"}, | 245 | {0x08180000, nullptr, "IsSdmcWritable"}, |
| 230 | {0x08190042, nullptr, "GetSdmcCid"}, | 246 | {0x08190042, nullptr, "GetSdmcCid"}, |
| 231 | {0x081A0042, nullptr, "GetNandCid"}, | 247 | {0x081A0042, nullptr, "GetNandCid"}, |