mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Services: Moved the PTM and APT services to their own folder
This coincidentally fixes an issue about the PTM service failing to create its SharedExtSaveData archive due to the FS service not being initialized by the time the creating code runs. Ideally I'd like to move each process to its own folder, and have a single file per process that registers the service classes, which would be in their own files inside that folder. Then each service class would just call functions from the process to complete the commands.
This commit is contained in:
		
							parent
							
								
									44f46254dc
								
							
						
					
					
						commit
						83a8975cb8
					
				
					 40 changed files with 1202 additions and 1110 deletions
				
			
		| 
						 | 
				
			
			@ -20,7 +20,9 @@
 | 
			
		|||
#include "core/file_sys/archive_sdmc.h"
 | 
			
		||||
#include "core/file_sys/archive_systemsavedata.h"
 | 
			
		||||
#include "core/file_sys/directory_backend.h"
 | 
			
		||||
#include "core/hle/service/service.h"
 | 
			
		||||
#include "core/hle/service/fs/archive.h"
 | 
			
		||||
#include "core/hle/service/fs/fs_user.h"
 | 
			
		||||
#include "core/hle/result.h"
 | 
			
		||||
 | 
			
		||||
// Specializes std::hash for ArchiveIdCode, so that we can use it in std::unordered_map.
 | 
			
		||||
| 
						 | 
				
			
			@ -419,6 +421,8 @@ ResultCode CreateExtSaveData(u32 high, u32 low) {
 | 
			
		|||
void ArchiveInit() {
 | 
			
		||||
    next_handle = 1;
 | 
			
		||||
 | 
			
		||||
    AddService(new FS::Interface);
 | 
			
		||||
 | 
			
		||||
    // TODO(Subv): Add the other archive types (see here for the known types:
 | 
			
		||||
    // http://3dbrew.org/wiki/FS:OpenArchive#Archive_idcodes).
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -520,7 +520,7 @@ static void CardSlotIsInserted(Service::Interface* self) {
 | 
			
		|||
    LOG_WARNING(Service_FS, "(STUBBED) called");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const FSUserInterface::FunctionInfo FunctionTable[] = {
 | 
			
		||||
const Interface::FunctionInfo FunctionTable[] = {
 | 
			
		||||
    {0x000100C6, nullptr,               "Dummy1"},
 | 
			
		||||
    {0x040100C4, nullptr,               "Control"},
 | 
			
		||||
    {0x08010002, Initialize,            "Initialize"},
 | 
			
		||||
| 
						 | 
				
			
			@ -614,7 +614,7 @@ const FSUserInterface::FunctionInfo FunctionTable[] = {
 | 
			
		|||
////////////////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// Interface class
 | 
			
		||||
 | 
			
		||||
FSUserInterface::FSUserInterface() {
 | 
			
		||||
Interface::Interface() {
 | 
			
		||||
    Register(FunctionTable);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,16 +6,13 @@
 | 
			
		|||
 | 
			
		||||
#include "core/hle/service/service.h"
 | 
			
		||||
 | 
			
		||||
////////////////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// Namespace FS_User
 | 
			
		||||
 | 
			
		||||
namespace Service {
 | 
			
		||||
namespace FS {
 | 
			
		||||
 | 
			
		||||
/// Interface to "fs:USER" service
 | 
			
		||||
class FSUserInterface : public Service::Interface {
 | 
			
		||||
class Interface : public Service::Interface {
 | 
			
		||||
public:
 | 
			
		||||
    FSUserInterface();
 | 
			
		||||
    Interface();
 | 
			
		||||
 | 
			
		||||
    std::string GetPortName() const override {
 | 
			
		||||
        return "fs:USER";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue