mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-03 16:39:01 -06:00 
			
		
		
		
	service/filesystem: Add fsp:ldr and fsp:pr services
Adds the basic skeleton for the remaining fsp services based off information provided by Switch Brew.
This commit is contained in:
		@@ -14,6 +14,8 @@
 | 
			
		||||
#include "core/file_sys/vfs_offset.h"
 | 
			
		||||
#include "core/file_sys/vfs_real.h"
 | 
			
		||||
#include "core/hle/service/filesystem/filesystem.h"
 | 
			
		||||
#include "core/hle/service/filesystem/fsp_ldr.h"
 | 
			
		||||
#include "core/hle/service/filesystem/fsp_pr.h"
 | 
			
		||||
#include "core/hle/service/filesystem/fsp_srv.h"
 | 
			
		||||
 | 
			
		||||
namespace Service::FileSystem {
 | 
			
		||||
@@ -298,6 +300,8 @@ void RegisterFileSystems() {
 | 
			
		||||
 | 
			
		||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
 | 
			
		||||
    RegisterFileSystems();
 | 
			
		||||
    std::make_shared<FSP_LDR>()->InstallAsService(service_manager);
 | 
			
		||||
    std::make_shared<FSP_PR>()->InstallAsService(service_manager);
 | 
			
		||||
    std::make_shared<FSP_SRV>()->InstallAsService(service_manager);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								src/core/hle/service/filesystem/fsp_ldr.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								src/core/hle/service/filesystem/fsp_ldr.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
// Copyright 2018 yuzu emulator team
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "core/hle/service/filesystem/fsp_ldr.h"
 | 
			
		||||
#include "core/hle/service/service.h"
 | 
			
		||||
 | 
			
		||||
namespace Service::FileSystem {
 | 
			
		||||
 | 
			
		||||
FSP_LDR::FSP_LDR() : ServiceFramework{"fsp:ldr"} {
 | 
			
		||||
    // clang-format off
 | 
			
		||||
    static const FunctionInfo functions[] = {
 | 
			
		||||
        {0, nullptr, "OpenCodeFileSystem"},
 | 
			
		||||
        {1, nullptr, "IsArchivedProgram"},
 | 
			
		||||
        {2, nullptr, "SetCurrentProcess"},
 | 
			
		||||
    };
 | 
			
		||||
    // clang-format on
 | 
			
		||||
 | 
			
		||||
    RegisterHandlers(functions);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
} // namespace Service::FileSystem
 | 
			
		||||
							
								
								
									
										16
									
								
								src/core/hle/service/filesystem/fsp_ldr.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								src/core/hle/service/filesystem/fsp_ldr.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
// Copyright 2018 yuzu emulator team
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "core/hle/service/service.h"
 | 
			
		||||
 | 
			
		||||
namespace Service::FileSystem {
 | 
			
		||||
 | 
			
		||||
class FSP_LDR final : public ServiceFramework<FSP_LDR> {
 | 
			
		||||
public:
 | 
			
		||||
    explicit FSP_LDR();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
} // namespace Service::FileSystem
 | 
			
		||||
							
								
								
									
										25
									
								
								src/core/hle/service/filesystem/fsp_pr.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								src/core/hle/service/filesystem/fsp_pr.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
// Copyright 2018 yuzu emulator team
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "core/hle/service/filesystem/fsp_pr.h"
 | 
			
		||||
#include "core/hle/service/service.h"
 | 
			
		||||
 | 
			
		||||
namespace Service::FileSystem {
 | 
			
		||||
 | 
			
		||||
FSP_PR::FSP_PR() : ServiceFramework{"fsp:pr"} {
 | 
			
		||||
    // clang-format off
 | 
			
		||||
    static const FunctionInfo functions[] = {
 | 
			
		||||
        {0, nullptr, "RegisterProgram"},
 | 
			
		||||
        {1, nullptr, "UnregisterProgram"},
 | 
			
		||||
        {2, nullptr, "SetCurrentProcess"},
 | 
			
		||||
        {256, nullptr, "SetEnabledProgramVerification"},
 | 
			
		||||
    };
 | 
			
		||||
    // clang-format on
 | 
			
		||||
 | 
			
		||||
    RegisterHandlers(functions);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
} // namespace Service::FileSystem
 | 
			
		||||
							
								
								
									
										16
									
								
								src/core/hle/service/filesystem/fsp_pr.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								src/core/hle/service/filesystem/fsp_pr.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
// Copyright 2018 yuzu emulator team
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "core/hle/service/service.h"
 | 
			
		||||
 | 
			
		||||
namespace Service::FileSystem {
 | 
			
		||||
 | 
			
		||||
class FSP_PR final : public ServiceFramework<FSP_PR> {
 | 
			
		||||
public:
 | 
			
		||||
    explicit FSP_PR();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
} // namespace Service::FileSystem
 | 
			
		||||
		Reference in New Issue
	
	Block a user