From 32b1409cbde53a86388a22e97043da9453d5f60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Thu, 29 Mar 2018 17:58:09 +0200 Subject: [PATCH] IOS/FS: Use hardware tested minimum reply time ...instead of an arbitrary guess. --- Source/Core/Core/IOS/FS/FileSystemProxy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/IOS/FS/FileSystemProxy.cpp b/Source/Core/Core/IOS/FS/FileSystemProxy.cpp index 75d0c6c6b4..6291066145 100644 --- a/Source/Core/Core/IOS/FS/FileSystemProxy.cpp +++ b/Source/Core/Core/IOS/FS/FileSystemProxy.cpp @@ -29,10 +29,10 @@ static s32 ConvertResult(ResultCode code) return -(static_cast(code) + 100); } -// XXX: timing is not the same for all commands and in all cases. -static IPCCommandResult GetFSReply(s32 return_value) +static IPCCommandResult GetFSReply(s32 return_value, u64 extra_tb_ticks = 0) { - return {return_value, true, SystemTimers::GetTicksPerSecond() / 500}; + // According to hardware tests, FS takes at least 2700 TB ticks to reply to commands. + return {return_value, true, (2700 + extra_tb_ticks) * SystemTimers::TIMER_RATIO}; } FS::FS(Kernel& ios, const std::string& device_name) : Device(ios, device_name)