mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 08:14:45 +02:00
Add basic infrastructure to time io better.
This allows the filesystems to more accurately control timing. But they're not actually doing it yet (same timing as before.)
This commit is contained in:
@@ -555,7 +555,7 @@ size_t MetaFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size)
|
||||
lock_guard guard(lock);
|
||||
IFileSystem *sys = GetHandleOwner(handle);
|
||||
if (sys)
|
||||
return sys->ReadFile(handle,pointer,size);
|
||||
return sys->ReadFile(handle, pointer, size);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
@@ -565,7 +565,27 @@ size_t MetaFileSystem::WriteFile(u32 handle, const u8 *pointer, s64 size)
|
||||
lock_guard guard(lock);
|
||||
IFileSystem *sys = GetHandleOwner(handle);
|
||||
if (sys)
|
||||
return sys->WriteFile(handle,pointer,size);
|
||||
return sys->WriteFile(handle, pointer, size);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t MetaFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size, int &usec)
|
||||
{
|
||||
lock_guard guard(lock);
|
||||
IFileSystem *sys = GetHandleOwner(handle);
|
||||
if (sys)
|
||||
return sys->ReadFile(handle, pointer, size, usec);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t MetaFileSystem::WriteFile(u32 handle, const u8 *pointer, s64 size, int &usec)
|
||||
{
|
||||
lock_guard guard(lock);
|
||||
IFileSystem *sys = GetHandleOwner(handle);
|
||||
if (sys)
|
||||
return sys->WriteFile(handle, pointer, size, usec);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user