summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChloe Marcec <dmarcecguzman@gmail.com>2021-09-08 16:09:04 +0200
committerChloe Marcec <dmarcecguzman@gmail.com>2021-09-08 16:09:04 +0200
commit89958e27aa81fb376005f262d725692698321607 (patch)
tree424c13dfb808af8fe992c3f04ba5f28a2882d0a6
parentaddress name shadowing with system (diff)
downloadyuzu-89958e27aa81fb376005f262d725692698321607.tar
yuzu-89958e27aa81fb376005f262d725692698321607.tar.gz
yuzu-89958e27aa81fb376005f262d725692698321607.tar.bz2
yuzu-89958e27aa81fb376005f262d725692698321607.tar.lz
yuzu-89958e27aa81fb376005f262d725692698321607.tar.xz
yuzu-89958e27aa81fb376005f262d725692698321607.tar.zst
yuzu-89958e27aa81fb376005f262d725692698321607.zip
-rw-r--r--src/core/hle/service/acc/acc.cpp13
-rw-r--r--src/core/hle/service/acc/async_context.cpp12
-rw-r--r--src/core/hle/service/acc/async_context.h4
3 files changed, 14 insertions, 15 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 1db054257..6d9ec0a8a 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -491,7 +491,7 @@ public:
class EnsureTokenIdCacheAsyncInterface final : public IAsyncContext {
public:
- explicit EnsureTokenIdCacheAsyncInterface(Core::System& system_) : IAsyncContext(system_) {
+ explicit EnsureTokenIdCacheAsyncInterface(Core::System& system_) : IAsyncContext{system_} {
MarkComplete();
}
~EnsureTokenIdCacheAsyncInterface() = default;
@@ -504,13 +504,13 @@ public:
}
protected:
- bool IsComplete() override {
+ bool IsComplete() const override {
return true;
}
void Cancel() override {}
- ResultCode GetResult() override {
+ ResultCode GetResult() const override {
return ResultSuccess;
}
};
@@ -518,7 +518,9 @@ protected:
class IManagerForApplication final : public ServiceFramework<IManagerForApplication> {
public:
explicit IManagerForApplication(Core::System& system_, Common::UUID user_id_)
- : ServiceFramework{system_, "IManagerForApplication"}, user_id{user_id_}, system(system_) {
+ : ServiceFramework{system_, "IManagerForApplication"},
+ ensure_token_id{std::make_shared<EnsureTokenIdCacheAsyncInterface>(system)},
+ user_id{user_id_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &IManagerForApplication::CheckAvailability, "CheckAvailability"},
@@ -533,8 +535,6 @@ public:
// clang-format on
RegisterHandlers(functions);
-
- ensure_token_id = std::make_shared<EnsureTokenIdCacheAsyncInterface>(system);
}
private:
@@ -591,7 +591,6 @@ private:
std::shared_ptr<EnsureTokenIdCacheAsyncInterface> ensure_token_id{};
Common::UUID user_id{Common::INVALID_UUID};
- Core::System& system;
};
// 6.0.0+
diff --git a/src/core/hle/service/acc/async_context.cpp b/src/core/hle/service/acc/async_context.cpp
index a9a8888ed..f7a7e34ea 100644
--- a/src/core/hle/service/acc/async_context.cpp
+++ b/src/core/hle/service/acc/async_context.cpp
@@ -14,12 +14,12 @@ IAsyncContext::IAsyncContext(Core::System& system_)
compeletion_event.Initialize("IAsyncContext:CompletionEvent");
// clang-format off
- static const FunctionInfo functions[] = {
- {0, &IAsyncContext::GetSystemEvent, "GetSystemEvent"},
- {1, &IAsyncContext::Cancel, "Cancel"},
- {2, &IAsyncContext::HasDone, "HasDone"},
- {3, &IAsyncContext::GetResult, "GetResult"},
- };
+ static const FunctionInfo functions[] = {
+ {0, &IAsyncContext::GetSystemEvent, "GetSystemEvent"},
+ {1, &IAsyncContext::Cancel, "Cancel"},
+ {2, &IAsyncContext::HasDone, "HasDone"},
+ {3, &IAsyncContext::GetResult, "GetResult"},
+ };
// clang-format on
RegisterHandlers(functions);
diff --git a/src/core/hle/service/acc/async_context.h b/src/core/hle/service/acc/async_context.h
index 2453a79f5..6592326d0 100644
--- a/src/core/hle/service/acc/async_context.h
+++ b/src/core/hle/service/acc/async_context.h
@@ -23,9 +23,9 @@ public:
void GetResult(Kernel::HLERequestContext& ctx);
protected:
- virtual bool IsComplete() = 0;
+ virtual bool IsComplete() const = 0;
virtual void Cancel() = 0;
- virtual ResultCode GetResult() = 0;
+ virtual ResultCode GetResult() const = 0;
void MarkComplete();