mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-01-15 08:23:17 -03:00
IOS/ES: Set the ESDevice::SetUID IPCReply delay based on ESCore::FindInstalledTMD.
This makes SetUID take more emulated time giving the host more time to actually do the work. The Wii menu "Data Management" -> "Save Data" -> "Wii" screen is no longer nearly as hard to emulate at full speed.
This commit is contained in:
@@ -310,17 +310,22 @@ IPCReply ESDevice::SetUID(u32 uid, const IOCtlVRequest& request)
|
||||
return IPCReply(ret);
|
||||
}
|
||||
|
||||
const auto tmd = m_core.FindInstalledTMD(title_id);
|
||||
// The IPCReply delay is calculated within FindInstalledTMD.
|
||||
// No clue if this is close to accurate, but our default delay of 4000
|
||||
// isn't enough time to actually do the work and is too hard to emulate at 100% speed.
|
||||
u64 delay_ticks = 0;
|
||||
|
||||
const auto tmd = m_core.FindInstalledTMD(title_id, Ticks{&delay_ticks});
|
||||
if (!tmd.IsValid())
|
||||
return IPCReply(FS_ENOENT);
|
||||
return IPCReply(FS_ENOENT, delay_ticks);
|
||||
|
||||
if (!UpdateUIDAndGID(kernel, &uid_sys, tmd))
|
||||
{
|
||||
ERROR_LOG_FMT(IOS_ES, "SetUID: Failed to get UID for title {:016x}", title_id);
|
||||
return IPCReply(ES_SHORT_READ);
|
||||
return IPCReply(ES_SHORT_READ, delay_ticks);
|
||||
}
|
||||
|
||||
return IPCReply(IPC_SUCCESS);
|
||||
return IPCReply(IPC_SUCCESS, delay_ticks);
|
||||
}
|
||||
|
||||
bool ESDevice::LaunchTitle(u64 title_id, HangPPC hang_ppc)
|
||||
|
||||
Reference in New Issue
Block a user