mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	HLE/FS: Implemented FSFile::OpenSubFile.
The File class now holds a list of connected sessions along with data unique to each session. A subfile is a window into an existing file. They have a few limitations compared to normal files: * They can't be written to. * They can't be flushed. * Their size can not be changed. * New subfiles can't be created from another subfile.
This commit is contained in:
		
							parent
							
								
									b88ed528a3
								
							
						
					
					
						commit
						c9ddd5b0ae
					
				
					 5 changed files with 184 additions and 28 deletions
				
			
		| 
						 | 
				
			
			@ -909,16 +909,12 @@ void BeginImportProgram(Service::Interface* self) {
 | 
			
		|||
    const FileSys::Path cia_path = {};
 | 
			
		||||
    auto file =
 | 
			
		||||
        std::make_shared<Service::FS::File>(std::make_unique<CIAFile>(media_type), cia_path);
 | 
			
		||||
    auto sessions = Kernel::ServerSession::CreateSessionPair(file->GetName());
 | 
			
		||||
    file->ClientConnected(std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions));
 | 
			
		||||
 | 
			
		||||
    cia_installing = true;
 | 
			
		||||
 | 
			
		||||
    IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
 | 
			
		||||
    rb.Push(RESULT_SUCCESS); // No error
 | 
			
		||||
    rb.PushCopyHandles(
 | 
			
		||||
        Kernel::g_handle_table.Create(std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions))
 | 
			
		||||
            .Unwrap());
 | 
			
		||||
    rb.PushCopyHandles(Kernel::g_handle_table.Create(file->Connect()).Unwrap());
 | 
			
		||||
 | 
			
		||||
    LOG_WARNING(Service_AM, "(STUBBED) media_type=%u", static_cast<u32>(media_type));
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue