Stubbed IsSdmcWriteable to always return writeable.

This commit is contained in:
archshift 2014-12-21 05:24:52 -03:00
parent 949d95659e
commit 81a538ccc2

View File

@ -425,6 +425,23 @@ static void IsSdmcDetected(Service::Interface* self) {
LOG_DEBUG(Service_FS, "called"); LOG_DEBUG(Service_FS, "called");
} }
/**
* 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, * FS_User::FormatSaveData service function,
* formats the SaveData specified by the input path. * formats the SaveData specified by the input path.
@ -510,7 +527,7 @@ const FSUserInterface::FunctionInfo FunctionTable[] = {
{0x08150000, nullptr, "GetNandArchiveResource"}, {0x08150000, nullptr, "GetNandArchiveResource"},
{0x08160000, nullptr, "GetSdmcFatfsErro"}, {0x08160000, nullptr, "GetSdmcFatfsErro"},
{0x08170000, IsSdmcDetected, "IsSdmcDetected"}, {0x08170000, IsSdmcDetected, "IsSdmcDetected"},
{0x08180000, nullptr, "IsSdmcWritable"}, {0x08180000, IsSdmcWriteable, "IsSdmcWritable"},
{0x08190042, nullptr, "GetSdmcCid"}, {0x08190042, nullptr, "GetSdmcCid"},
{0x081A0042, nullptr, "GetNandCid"}, {0x081A0042, nullptr, "GetNandCid"},
{0x081B0000, nullptr, "GetSdmcSpeedInfo"}, {0x081B0000, nullptr, "GetSdmcSpeedInfo"},