[Kernel] Added support for writing/reading GPD files
This breaks settings in games that are using them and savefiles in games that use settings to store progress
This commit is contained in:
committed by
Radosław Gliński
parent
ccf7adf015
commit
1110cdd372
@@ -25,7 +25,9 @@ XamState::XamState(Emulator* emulator, KernelState* kernel_state)
|
||||
content_manager_ =
|
||||
std::make_unique<ContentManager>(kernel_state, content_root);
|
||||
|
||||
profile_manager_ = std::make_unique<ProfileManager>(kernel_state);
|
||||
user_tracker_ = std::make_unique<UserTracker>();
|
||||
profile_manager_ =
|
||||
std::make_unique<ProfileManager>(kernel_state, user_tracker_.get());
|
||||
achievement_manager_ = std::make_unique<AchievementManager>();
|
||||
|
||||
AppManager::RegisterApps(kernel_state, app_manager_.get());
|
||||
@@ -58,6 +60,21 @@ bool XamState::IsUserSignedIn(uint64_t xuid) const {
|
||||
return GetUserProfile(xuid) != nullptr;
|
||||
}
|
||||
|
||||
void XamState::LoadSpaInfo(const SpaInfo* info) {
|
||||
// Check if we have loaded SpaInfo already. If yes then check currently loaded
|
||||
// version.
|
||||
if (spa_info_) {
|
||||
// Trying to load spa with lower version, for whatever reason.
|
||||
if (*info <= *spa_info_) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
spa_info_ = std::make_unique<SpaInfo>(*info);
|
||||
spa_info_->Load();
|
||||
user_tracker_->UpdateSpaInfo(spa_info_.get());
|
||||
}
|
||||
|
||||
} // namespace xam
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
Reference in New Issue
Block a user