diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-06-26 04:25:10 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-06-26 04:25:10 +0200 |
commit | d10fc2d7277cf075f875fe2831501cb79c50e21a (patch) | |
tree | a1ef0e65dfd79f8badde8dcd24014432428c51f8 /src/core/hle/service/glue/manager.cpp | |
parent | core: Keep track of ARPManager and register current application on boot (diff) | |
download | yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.gz yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.bz2 yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.lz yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.xz yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.zst yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.zip |
Diffstat (limited to 'src/core/hle/service/glue/manager.cpp')
-rw-r--r-- | src/core/hle/service/glue/manager.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/core/hle/service/glue/manager.cpp b/src/core/hle/service/glue/manager.cpp index 0d5bb4d50..6da52d2d6 100644 --- a/src/core/hle/service/glue/manager.cpp +++ b/src/core/hle/service/glue/manager.cpp @@ -7,18 +7,23 @@ namespace Service::Glue { +struct ARPManager::MapEntry { + ApplicationLaunchProperty launch; + std::vector<u8> control; +}; + ARPManager::ARPManager() = default; ARPManager::~ARPManager() = default; ResultVal<ApplicationLaunchProperty> ARPManager::GetLaunchProperty(u64 title_id) const { if (title_id == 0) { - return ERR_TITLE_ID_ZERO; + return ERR_INVALID_PROCESS_ID; } const auto iter = entries.find(title_id); if (iter == entries.end()) { - return ERR_NONEXISTENT; + return ERR_NOT_REGISTERED; } return MakeResult<ApplicationLaunchProperty>(iter->second.launch); @@ -26,12 +31,12 @@ ResultVal<ApplicationLaunchProperty> ARPManager::GetLaunchProperty(u64 title_id) ResultVal<std::vector<u8>> ARPManager::GetControlProperty(u64 title_id) const { if (title_id == 0) { - return ERR_TITLE_ID_ZERO; + return ERR_INVALID_PROCESS_ID; } const auto iter = entries.find(title_id); if (iter == entries.end()) { - return ERR_NONEXISTENT; + return ERR_NOT_REGISTERED; } return MakeResult<std::vector<u8>>(iter->second.control); @@ -40,12 +45,12 @@ ResultVal<std::vector<u8>> ARPManager::GetControlProperty(u64 title_id) const { ResultCode ARPManager::Register(u64 title_id, ApplicationLaunchProperty launch, std::vector<u8> control) { if (title_id == 0) { - return ERR_TITLE_ID_ZERO; + return ERR_INVALID_PROCESS_ID; } const auto iter = entries.find(title_id); if (iter != entries.end()) { - return ERR_ALREADY_ISSUED; + return ERR_INVALID_ACCESS; } entries.insert_or_assign(title_id, MapEntry{launch, std::move(control)}); @@ -54,12 +59,12 @@ ResultCode ARPManager::Register(u64 title_id, ApplicationLaunchProperty launch, ResultCode ARPManager::Unregister(u64 title_id) { if (title_id == 0) { - return ERR_TITLE_ID_ZERO; + return ERR_INVALID_PROCESS_ID; } const auto iter = entries.find(title_id); if (iter == entries.end()) { - return ERR_NONEXISTENT; + return ERR_NOT_REGISTERED; } entries.erase(iter); |