diff options
| author | 2021-04-07 11:03:45 -0400 | |
|---|---|---|
| committer | 2021-04-09 00:49:47 -0400 | |
| commit | 5ce0e127daddc3683904a409f0ad496fdda4ba44 (patch) | |
| tree | 3f36f2eae00ace60b6a86c15a8ae5a78f19979aa /src/core/hle/service/glue | |
| parent | vi: Update to 12.x (diff) | |
| download | yuzu-5ce0e127daddc3683904a409f0ad496fdda4ba44.tar.gz yuzu-5ce0e127daddc3683904a409f0ad496fdda4ba44.tar.xz yuzu-5ce0e127daddc3683904a409f0ad496fdda4ba44.zip | |
bgtc: Update to 12.x and implement OpenTaskService
Diffstat (limited to 'src/core/hle/service/glue')
| -rw-r--r-- | src/core/hle/service/glue/bgtc.cpp | 27 | ||||
| -rw-r--r-- | src/core/hle/service/glue/bgtc.h | 8 |
2 files changed, 34 insertions, 1 deletions
diff --git a/src/core/hle/service/glue/bgtc.cpp b/src/core/hle/service/glue/bgtc.cpp index a478b68e1..daecfff15 100644 --- a/src/core/hle/service/glue/bgtc.cpp +++ b/src/core/hle/service/glue/bgtc.cpp | |||
| @@ -2,6 +2,9 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/logging/log.h" | ||
| 6 | #include "core/core.h" | ||
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 5 | #include "core/hle/service/glue/bgtc.h" | 8 | #include "core/hle/service/glue/bgtc.h" |
| 6 | 9 | ||
| 7 | namespace Service::Glue { | 10 | namespace Service::Glue { |
| @@ -9,6 +12,26 @@ namespace Service::Glue { | |||
| 9 | BGTC_T::BGTC_T(Core::System& system_) : ServiceFramework{system_, "bgtc:t"} { | 12 | BGTC_T::BGTC_T(Core::System& system_) : ServiceFramework{system_, "bgtc:t"} { |
| 10 | // clang-format off | 13 | // clang-format off |
| 11 | static const FunctionInfo functions[] = { | 14 | static const FunctionInfo functions[] = { |
| 15 | {100, &BGTC_T::OpenTaskService, "OpenTaskService"}, | ||
| 16 | }; | ||
| 17 | // clang-format on | ||
| 18 | |||
| 19 | RegisterHandlers(functions); | ||
| 20 | } | ||
| 21 | |||
| 22 | BGTC_T::~BGTC_T() = default; | ||
| 23 | |||
| 24 | void BGTC_T::OpenTaskService(Kernel::HLERequestContext& ctx) { | ||
| 25 | LOG_DEBUG(Service_BGTC, "called"); | ||
| 26 | |||
| 27 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 28 | rb.Push(RESULT_SUCCESS); | ||
| 29 | rb.PushIpcInterface<ITaskService>(system); | ||
| 30 | } | ||
| 31 | |||
| 32 | ITaskService::ITaskService(Core::System& system_) : ServiceFramework{system_, "ITaskService"} { | ||
| 33 | // clang-format off | ||
| 34 | static const FunctionInfo functions[] = { | ||
| 12 | {1, nullptr, "NotifyTaskStarting"}, | 35 | {1, nullptr, "NotifyTaskStarting"}, |
| 13 | {2, nullptr, "NotifyTaskFinished"}, | 36 | {2, nullptr, "NotifyTaskFinished"}, |
| 14 | {3, nullptr, "GetTriggerEvent"}, | 37 | {3, nullptr, "GetTriggerEvent"}, |
| @@ -20,16 +43,18 @@ BGTC_T::BGTC_T(Core::System& system_) : ServiceFramework{system_, "bgtc:t"} { | |||
| 20 | {13, nullptr, "UnscheduleTask"}, | 43 | {13, nullptr, "UnscheduleTask"}, |
| 21 | {14, nullptr, "GetScheduleEvent"}, | 44 | {14, nullptr, "GetScheduleEvent"}, |
| 22 | {15, nullptr, "SchedulePeriodicTask"}, | 45 | {15, nullptr, "SchedulePeriodicTask"}, |
| 46 | {16, nullptr, "Unknown16"}, | ||
| 23 | {101, nullptr, "GetOperationMode"}, | 47 | {101, nullptr, "GetOperationMode"}, |
| 24 | {102, nullptr, "WillDisconnectNetworkWhenEnteringSleep"}, | 48 | {102, nullptr, "WillDisconnectNetworkWhenEnteringSleep"}, |
| 25 | {103, nullptr, "WillStayHalfAwakeInsteadSleep"}, | 49 | {103, nullptr, "WillStayHalfAwakeInsteadSleep"}, |
| 50 | {200, nullptr, "Unknown200"}, | ||
| 26 | }; | 51 | }; |
| 27 | // clang-format on | 52 | // clang-format on |
| 28 | 53 | ||
| 29 | RegisterHandlers(functions); | 54 | RegisterHandlers(functions); |
| 30 | } | 55 | } |
| 31 | 56 | ||
| 32 | BGTC_T::~BGTC_T() = default; | 57 | ITaskService::~ITaskService() = default; |
| 33 | 58 | ||
| 34 | BGTC_SC::BGTC_SC(Core::System& system_) : ServiceFramework{system_, "bgtc:sc"} { | 59 | BGTC_SC::BGTC_SC(Core::System& system_) : ServiceFramework{system_, "bgtc:sc"} { |
| 35 | // clang-format off | 60 | // clang-format off |
diff --git a/src/core/hle/service/glue/bgtc.h b/src/core/hle/service/glue/bgtc.h index 906116ba6..4c0142fd5 100644 --- a/src/core/hle/service/glue/bgtc.h +++ b/src/core/hle/service/glue/bgtc.h | |||
| @@ -16,6 +16,14 @@ class BGTC_T final : public ServiceFramework<BGTC_T> { | |||
| 16 | public: | 16 | public: |
| 17 | explicit BGTC_T(Core::System& system_); | 17 | explicit BGTC_T(Core::System& system_); |
| 18 | ~BGTC_T() override; | 18 | ~BGTC_T() override; |
| 19 | |||
| 20 | void OpenTaskService(Kernel::HLERequestContext& ctx); | ||
| 21 | }; | ||
| 22 | |||
| 23 | class ITaskService final : public ServiceFramework<ITaskService> { | ||
| 24 | public: | ||
| 25 | explicit ITaskService(Core::System& system_); | ||
| 26 | ~ITaskService() override; | ||
| 19 | }; | 27 | }; |
| 20 | 28 | ||
| 21 | class BGTC_SC final : public ServiceFramework<BGTC_SC> { | 29 | class BGTC_SC final : public ServiceFramework<BGTC_SC> { |