mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	File_Sys: Add a size dependend delay for each file read
This commit is contained in:
		
							parent
							
								
									e51a642a13
								
							
						
					
					
						commit
						58b16c5459
					
				
					 7 changed files with 65 additions and 0 deletions
				
			
		|  | @ -31,6 +31,7 @@ | |||
| #include "core/hle/ipc_helpers.h" | ||||
| #include "core/hle/kernel/client_port.h" | ||||
| #include "core/hle/kernel/client_session.h" | ||||
| #include "core/hle/kernel/event.h" | ||||
| #include "core/hle/kernel/handle_table.h" | ||||
| #include "core/hle/kernel/server_session.h" | ||||
| #include "core/hle/result.h" | ||||
|  | @ -121,6 +122,13 @@ void File::Read(Kernel::HLERequestContext& ctx) { | |||
|         rb.Push<u32>(*read); | ||||
|     } | ||||
|     rb.PushMappedBuffer(buffer); | ||||
| 
 | ||||
|     u64 read_timeout_ns = backend->GetReadDelayNs(length); | ||||
|     ctx.SleepClientThread(Kernel::GetCurrentThread(), "file::read", read_timeout_ns, | ||||
|                           [](Kernel::SharedPtr<Kernel::Thread> thread, | ||||
|                              Kernel::HLERequestContext& ctx, ThreadWakeupReason reason) { | ||||
|                               // Nothing to do here
 | ||||
|                           }); | ||||
| } | ||||
| 
 | ||||
| void File::Write(Kernel::HLERequestContext& ctx) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue