Initial support for title switching + better Wii U menu compatibility (#907)

This commit is contained in:
Exzap 2023-07-21 13:54:07 +02:00 committed by GitHub
parent bfbeeae6f6
commit 2200cc0ddf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
95 changed files with 2549 additions and 746 deletions

View file

@ -43,8 +43,11 @@ namespace acp
return ACPStatus::SUCCESS;
}
bool sSaveDirMounted{false};
ACPStatus ACPMountSaveDir()
{
cemu_assert_debug(!sSaveDirMounted);
uint64 titleId = CafeSystem::GetForegroundTitleId();
uint32 high = GetTitleIdHigh(titleId) & (~0xC);
uint32 low = GetTitleIdLow(titleId);
@ -56,6 +59,13 @@ namespace acp
return _ACPConvertResultToACPStatus(&mountResult, "ACPMountSaveDir", 0x60);
}
ACPStatus ACPUnmountSaveDir()
{
cemu_assert_debug(!sSaveDirMounted);
fsc_unmount("/vol/save/", FSC_PRIORITY_BASE);
return ACPStatus::SUCCESS;
}
uint64 _acpGetTimestamp()
{
return coreinit::coreinit_getOSTime() / ESPRESSO_TIMER_CLOCK;
@ -434,12 +444,12 @@ namespace acp
ppcDefineParamU32(deviceId, 3);
if (deviceId != 3)
assert_dbg();
cemuLog_logDebug(LogType::Force, "ACPGetTitleMetaXmlByDevice(): Unsupported deviceId");
acpPrepareRequest();
acpRequest->requestCode = IOSU_ACP_GET_TITLE_META_XML;
acpRequest->ptr = acpMetaXml;
acpRequest->titleId = CafeSystem::GetForegroundTitleId();
acpRequest->titleId = titleId;//CafeSystem::GetForegroundTitleId();
__depr__IOS_Ioctlv(IOS_DEVICE_ACP_MAIN, IOSU_ACP_REQUEST_CEMU, 1, 1, acpBufferVector);