mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Start implementing SystemSaveData
This commit is contained in:
parent
eade124f00
commit
c48f8327c6
6 changed files with 64 additions and 2 deletions
12
src/core/fs/archive_system_save_data.cpp
Normal file
12
src/core/fs/archive_system_save_data.cpp
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include <algorithm>
|
||||
#include "fs/archive_system_save_data.hpp"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
Rust::Result<ArchiveBase*, HorizonResult> SystemSaveDataArchive::openArchive(const FSPath& path) {
|
||||
if (path.type != PathType::Empty) {
|
||||
Helpers::panic("Unimplemented path type for SystemSaveData::OpenArchive");
|
||||
}
|
||||
|
||||
return Ok((ArchiveBase*)this);
|
||||
}
|
|
@ -228,6 +228,13 @@ void Kernel::getProcessInfo() {
|
|||
}
|
||||
|
||||
switch (type) {
|
||||
// Returns the amount of <related unused field> + total supervisor-mode stack size + page-rounded size of the external handle table
|
||||
case 1:
|
||||
Helpers::warn("GetProcessInfo: Unimplemented type 1");
|
||||
regs[1] = 0;
|
||||
regs[2] = 0;
|
||||
break;
|
||||
|
||||
// According to 3DBrew: Amount of private (code, data, heap) memory used by the process + total supervisor-mode
|
||||
// stack size + page-rounded size of the external handle table
|
||||
case 2:
|
||||
|
|
|
@ -85,6 +85,7 @@ ArchiveBase* FSService::getArchiveFromID(u32 id, const FSPath& archivePath) {
|
|||
case ArchiveID::SharedExtSaveData:
|
||||
return &sharedExtSaveData_nand;
|
||||
|
||||
case ArchiveID::SystemSaveData: return &systemSaveData;
|
||||
case ArchiveID::SDMC: return &sdmc;
|
||||
case ArchiveID::SavedataAndNcch: return &ncch; // This can only access NCCH outside of FSPXI
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue