service/apt: Add and implement more service commands. (#6721)

* service/apt: Add and implement more service commands.

* service/apt: Implement power button.

* Address review comments and fix GetApplicationRunningMode bug.
This commit is contained in:
Steveice10
2023-07-29 00:26:16 -07:00
committed by GitHub
parent 51996c54f0
commit bb364d9bc0
31 changed files with 939 additions and 221 deletions
+13
View File
@@ -29,4 +29,17 @@ std::shared_ptr<Kernel::Process> LaunchTitle(FS::MediaType media_type, u64 title
return process;
}
void RebootToTitle(Core::System& system, FS::MediaType media_type, u64 title_id) {
auto new_path = AM::GetTitleContentPath(media_type, title_id);
if (new_path.empty() || !FileUtil::Exists(new_path)) {
// TODO: This can happen if the requested title is not installed. Need a way to find
// non-installed titles in the game list.
LOG_CRITICAL(Service_APT,
"Failed to find title '{}' to jump to, resetting current title instead.",
new_path);
new_path.clear();
}
system.RequestReset(new_path);
}
} // namespace Service::NS