mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Fixed file services serialization
This commit is contained in:
		
							parent
							
								
									c24ea0f0ee
								
							
						
					
					
						commit
						2217b3558d
					
				
					 6 changed files with 26 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -19,11 +19,14 @@ void Directory::serialize(Archive& ar, const unsigned int) {
 | 
			
		|||
    ar& backend;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Directory::Directory() : ServiceFramework("", 1) {}
 | 
			
		||||
 | 
			
		||||
Directory::Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend,
 | 
			
		||||
                     const FileSys::Path& path)
 | 
			
		||||
    : ServiceFramework("", 1), path(path), backend(std::move(backend)) {
 | 
			
		||||
    : Directory() {
 | 
			
		||||
    this->backend = std::move(backend);
 | 
			
		||||
    this->path = path;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Directory::Directory() : ServiceFramework("", 1), path(""), backend(nullptr) {
 | 
			
		||||
    static const FunctionInfo functions[] = {
 | 
			
		||||
        // clang-format off
 | 
			
		||||
        {0x08010042, &Directory::Read, "Read"},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,11 +26,17 @@ void File::serialize(Archive& ar, const unsigned int) {
 | 
			
		|||
    ar& backend;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
File::File() : ServiceFramework("", 1), kernel(Core::Global<Kernel::KernelSystem>()) {}
 | 
			
		||||
File::File() : File(Core::Global<Kernel::KernelSystem>()) {}
 | 
			
		||||
 | 
			
		||||
File::File(Kernel::KernelSystem& kernel, std::unique_ptr<FileSys::FileBackend>&& backend,
 | 
			
		||||
           const FileSys::Path& path)
 | 
			
		||||
    : ServiceFramework("", 1), path(path), backend(std::move(backend)), kernel(kernel) {
 | 
			
		||||
    : File(kernel) {
 | 
			
		||||
    this->backend = std::move(backend);
 | 
			
		||||
    this->path = path;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
File::File(Kernel::KernelSystem& kernel)
 | 
			
		||||
    : ServiceFramework("", 1), path(""), backend(nullptr), kernel(kernel) {
 | 
			
		||||
    static const FunctionInfo functions[] = {
 | 
			
		||||
        {0x08010100, &File::OpenSubFile, "OpenSubFile"},
 | 
			
		||||
        {0x080200C2, &File::Read, "Read"},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -74,6 +74,7 @@ private:
 | 
			
		|||
 | 
			
		||||
    Kernel::KernelSystem& kernel;
 | 
			
		||||
 | 
			
		||||
    File(Kernel::KernelSystem& kernel);
 | 
			
		||||
    File();
 | 
			
		||||
 | 
			
		||||
    template <class Archive>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue