summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/acc/acc.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-11-07 01:45:01 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-11-07 01:45:01 +0100
commit92fcc6d15a1bf2f3db4e8409bf751a5ec08fa32e (patch)
tree58a1278455c1966f47834630ddf222ae9e53a96e /src/core/hle/service/acc/acc.cpp
parentMerge pull request #1649 from degasus/split_resource_manager (diff)
downloadyuzu-92fcc6d15a1bf2f3db4e8409bf751a5ec08fa32e.tar
yuzu-92fcc6d15a1bf2f3db4e8409bf751a5ec08fa32e.tar.gz
yuzu-92fcc6d15a1bf2f3db4e8409bf751a5ec08fa32e.tar.bz2
yuzu-92fcc6d15a1bf2f3db4e8409bf751a5ec08fa32e.tar.lz
yuzu-92fcc6d15a1bf2f3db4e8409bf751a5ec08fa32e.tar.xz
yuzu-92fcc6d15a1bf2f3db4e8409bf751a5ec08fa32e.tar.zst
yuzu-92fcc6d15a1bf2f3db4e8409bf751a5ec08fa32e.zip
Diffstat (limited to 'src/core/hle/service/acc/acc.cpp')
-rw-r--r--src/core/hle/service/acc/acc.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index c6437a671..870410476 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -242,6 +242,27 @@ void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestCo
LOG_DEBUG(Service_ACC, "called");
}
+void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx) {
+ // A u8 is passed into this function which we can safely ignore. It's to determain if we have
+ // access to use the network or not by the looks of it
+ IPC::ResponseBuilder rb{ctx, 6};
+ if (profile_manager->GetUserCount() != 1) {
+ rb.Push(RESULT_SUCCESS);
+ rb.PushRaw<u128>(INVALID_UUID);
+ return;
+ }
+ auto user_list = profile_manager->GetAllUsers();
+ if (user_list.empty()) {
+ rb.Push(ResultCode(-1)); // TODO(ogniK): Find the correct error code
+ rb.PushRaw<u128>(INVALID_UUID);
+ return;
+ }
+
+ // Select the first user we have
+ rb.Push(RESULT_SUCCESS);
+ rb.PushRaw<u128>(profile_manager->GetUser(0)->uuid);
+}
+
Module::Interface::Interface(std::shared_ptr<Module> module,
std::shared_ptr<ProfileManager> profile_manager, const char* name)
: ServiceFramework(name), module(std::move(module)),