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:
@@ -521,6 +521,11 @@ InstallStatus InstallFromNus(u64 title_id, int version) {
|
||||
#endif
|
||||
}
|
||||
|
||||
u64 GetTitleUpdateId(u64 title_id) {
|
||||
// Real services seem to just discard and replace the whole high word.
|
||||
return (title_id & 0xFFFFFFFF) | (static_cast<u64>(TID_HIGH_UPDATE) << 32);
|
||||
}
|
||||
|
||||
Service::FS::MediaType GetTitleMediaType(u64 titleId) {
|
||||
u16 platform = static_cast<u16>(titleId >> 48);
|
||||
u16 category = static_cast<u16>((titleId >> 32) & 0xFFFF);
|
||||
|
||||
@@ -118,6 +118,13 @@ InstallStatus InstallCIA(const std::string& path,
|
||||
*/
|
||||
InstallStatus InstallFromNus(u64 title_id, int version = -1);
|
||||
|
||||
/**
|
||||
* Get the update title ID for a title
|
||||
* @param titleId the title ID
|
||||
* @returns The update title ID
|
||||
*/
|
||||
u64 GetTitleUpdateId(u64 title_id);
|
||||
|
||||
/**
|
||||
* Get the mediatype for an installed title
|
||||
* @param titleId the installed title ID
|
||||
|
||||
Reference in New Issue
Block a user