diff options
| author | 2018-08-01 21:34:28 -0400 | |
|---|---|---|
| committer | 2018-08-01 21:34:28 -0400 | |
| commit | 746d7d4d280d87606d5033ca28b05261435b927d (patch) | |
| tree | 94e351b91470154c83f2a2b0d841c2390357ede6 /src | |
| parent | Merge pull request #890 from lioncash/logger (diff) | |
| parent | service: Add capture services (diff) | |
| download | yuzu-746d7d4d280d87606d5033ca28b05261435b927d.tar.gz yuzu-746d7d4d280d87606d5033ca28b05261435b927d.tar.xz yuzu-746d7d4d280d87606d5033ca28b05261435b927d.zip | |
Merge pull request #888 from lioncash/caps
service: Add capture services
Diffstat (limited to '')
| -rw-r--r-- | src/common/logging/backend.cpp | 1 | ||||
| -rw-r--r-- | src/common/logging/log.h | 1 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps.cpp | 152 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps.h | 15 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 |
6 files changed, 173 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index ba0677fa4..d6714587c 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -171,6 +171,7 @@ void FileBackend::Write(const Entry& entry) { | |||
| 171 | SUB(Service, BCAT) \ | 171 | SUB(Service, BCAT) \ |
| 172 | SUB(Service, BPC) \ | 172 | SUB(Service, BPC) \ |
| 173 | SUB(Service, BTM) \ | 173 | SUB(Service, BTM) \ |
| 174 | SUB(Service, Capture) \ | ||
| 174 | SUB(Service, Fatal) \ | 175 | SUB(Service, Fatal) \ |
| 175 | SUB(Service, FGM) \ | 176 | SUB(Service, FGM) \ |
| 176 | SUB(Service, Friend) \ | 177 | SUB(Service, Friend) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 8fd552233..e96d817f4 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -58,6 +58,7 @@ enum class Class : ClassType { | |||
| 58 | Service_BCAT, ///< The BCAT service | 58 | Service_BCAT, ///< The BCAT service |
| 59 | Service_BPC, ///< The BPC service | 59 | Service_BPC, ///< The BPC service |
| 60 | Service_BTM, ///< The BTM service | 60 | Service_BTM, ///< The BTM service |
| 61 | Service_Capture, ///< The capture service | ||
| 61 | Service_Fatal, ///< The Fatal service | 62 | Service_Fatal, ///< The Fatal service |
| 62 | Service_FGM, ///< The FGM service | 63 | Service_FGM, ///< The FGM service |
| 63 | Service_Friend, ///< The friend service | 64 | Service_Friend, ///< The friend service |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 7d615104e..3cc9160ca 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -160,6 +160,8 @@ add_library(core STATIC | |||
| 160 | hle/service/btdrv/btdrv.h | 160 | hle/service/btdrv/btdrv.h |
| 161 | hle/service/btm/btm.cpp | 161 | hle/service/btm/btm.cpp |
| 162 | hle/service/btm/btm.h | 162 | hle/service/btm/btm.h |
| 163 | hle/service/caps/caps.cpp | ||
| 164 | hle/service/caps/caps.h | ||
| 163 | hle/service/erpt/erpt.cpp | 165 | hle/service/erpt/erpt.cpp |
| 164 | hle/service/erpt/erpt.h | 166 | hle/service/erpt/erpt.h |
| 165 | hle/service/es/es.cpp | 167 | hle/service/es/es.cpp |
diff --git a/src/core/hle/service/caps/caps.cpp b/src/core/hle/service/caps/caps.cpp new file mode 100644 index 000000000..ae7b0720b --- /dev/null +++ b/src/core/hle/service/caps/caps.cpp | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <memory> | ||
| 6 | |||
| 7 | #include "core/hle/service/caps/caps.h" | ||
| 8 | #include "core/hle/service/service.h" | ||
| 9 | #include "core/hle/service/sm/sm.h" | ||
| 10 | |||
| 11 | namespace Service::Capture { | ||
| 12 | |||
| 13 | class CAPS_A final : public ServiceFramework<CAPS_A> { | ||
| 14 | public: | ||
| 15 | explicit CAPS_A() : ServiceFramework{"caps:a"} { | ||
| 16 | // clang-format off | ||
| 17 | static const FunctionInfo functions[] = { | ||
| 18 | {0, nullptr, "Unknown1"}, | ||
| 19 | {1, nullptr, "Unknown2"}, | ||
| 20 | {2, nullptr, "Unknown3"}, | ||
| 21 | {3, nullptr, "Unknown4"}, | ||
| 22 | {4, nullptr, "Unknown5"}, | ||
| 23 | {5, nullptr, "Unknown6"}, | ||
| 24 | {6, nullptr, "Unknown7"}, | ||
| 25 | {7, nullptr, "Unknown8"}, | ||
| 26 | {8, nullptr, "Unknown9"}, | ||
| 27 | {9, nullptr, "Unknown10"}, | ||
| 28 | {10, nullptr, "Unknown11"}, | ||
| 29 | {11, nullptr, "Unknown12"}, | ||
| 30 | {12, nullptr, "Unknown13"}, | ||
| 31 | {13, nullptr, "Unknown14"}, | ||
| 32 | {14, nullptr, "Unknown15"}, | ||
| 33 | {301, nullptr, "Unknown16"}, | ||
| 34 | {401, nullptr, "Unknown17"}, | ||
| 35 | {501, nullptr, "Unknown18"}, | ||
| 36 | {1001, nullptr, "Unknown19"}, | ||
| 37 | {1002, nullptr, "Unknown20"}, | ||
| 38 | {8001, nullptr, "Unknown21"}, | ||
| 39 | {8002, nullptr, "Unknown22"}, | ||
| 40 | {8011, nullptr, "Unknown23"}, | ||
| 41 | {8012, nullptr, "Unknown24"}, | ||
| 42 | {8021, nullptr, "Unknown25"}, | ||
| 43 | {10011, nullptr, "Unknown26"}, | ||
| 44 | }; | ||
| 45 | // clang-format on | ||
| 46 | |||
| 47 | RegisterHandlers(functions); | ||
| 48 | } | ||
| 49 | }; | ||
| 50 | |||
| 51 | class CAPS_C final : public ServiceFramework<CAPS_C> { | ||
| 52 | public: | ||
| 53 | explicit CAPS_C() : ServiceFramework{"caps:c"} { | ||
| 54 | // clang-format off | ||
| 55 | static const FunctionInfo functions[] = { | ||
| 56 | {2001, nullptr, "Unknown1"}, | ||
| 57 | {2002, nullptr, "Unknown2"}, | ||
| 58 | {2011, nullptr, "Unknown3"}, | ||
| 59 | {2012, nullptr, "Unknown4"}, | ||
| 60 | {2013, nullptr, "Unknown5"}, | ||
| 61 | {2014, nullptr, "Unknown6"}, | ||
| 62 | {2101, nullptr, "Unknown7"}, | ||
| 63 | {2102, nullptr, "Unknown8"}, | ||
| 64 | {2201, nullptr, "Unknown9"}, | ||
| 65 | {2301, nullptr, "Unknown10"}, | ||
| 66 | }; | ||
| 67 | // clang-format on | ||
| 68 | |||
| 69 | RegisterHandlers(functions); | ||
| 70 | } | ||
| 71 | }; | ||
| 72 | |||
| 73 | class CAPS_SC final : public ServiceFramework<CAPS_SC> { | ||
| 74 | public: | ||
| 75 | explicit CAPS_SC() : ServiceFramework{"caps:sc"} { | ||
| 76 | // clang-format off | ||
| 77 | static const FunctionInfo functions[] = { | ||
| 78 | {1, nullptr, "Unknown1"}, | ||
| 79 | {2, nullptr, "Unknown2"}, | ||
| 80 | {1001, nullptr, "Unknown3"}, | ||
| 81 | {1002, nullptr, "Unknown4"}, | ||
| 82 | {1003, nullptr, "Unknown5"}, | ||
| 83 | {1011, nullptr, "Unknown6"}, | ||
| 84 | {1012, nullptr, "Unknown7"}, | ||
| 85 | {1201, nullptr, "Unknown8"}, | ||
| 86 | {1202, nullptr, "Unknown9"}, | ||
| 87 | {1203, nullptr, "Unknown10"}, | ||
| 88 | }; | ||
| 89 | // clang-format on | ||
| 90 | |||
| 91 | RegisterHandlers(functions); | ||
| 92 | } | ||
| 93 | }; | ||
| 94 | |||
| 95 | class CAPS_SS final : public ServiceFramework<CAPS_SS> { | ||
| 96 | public: | ||
| 97 | explicit CAPS_SS() : ServiceFramework{"caps:ss"} { | ||
| 98 | // clang-format off | ||
| 99 | static const FunctionInfo functions[] = { | ||
| 100 | {201, nullptr, "Unknown1"}, | ||
| 101 | {202, nullptr, "Unknown2"}, | ||
| 102 | {203, nullptr, "Unknown3"}, | ||
| 103 | {204, nullptr, "Unknown4"}, | ||
| 104 | }; | ||
| 105 | // clang-format on | ||
| 106 | |||
| 107 | RegisterHandlers(functions); | ||
| 108 | } | ||
| 109 | }; | ||
| 110 | |||
| 111 | class CAPS_SU final : public ServiceFramework<CAPS_SU> { | ||
| 112 | public: | ||
| 113 | explicit CAPS_SU() : ServiceFramework{"caps:su"} { | ||
| 114 | // clang-format off | ||
| 115 | static const FunctionInfo functions[] = { | ||
| 116 | {201, nullptr, "SaveScreenShot"}, | ||
| 117 | {203, nullptr, "SaveScreenShotEx0"}, | ||
| 118 | }; | ||
| 119 | // clang-format on | ||
| 120 | |||
| 121 | RegisterHandlers(functions); | ||
| 122 | } | ||
| 123 | }; | ||
| 124 | |||
| 125 | class CAPS_U final : public ServiceFramework<CAPS_U> { | ||
| 126 | public: | ||
| 127 | explicit CAPS_U() : ServiceFramework{"caps:u"} { | ||
| 128 | // clang-format off | ||
| 129 | static const FunctionInfo functions[] = { | ||
| 130 | {102, nullptr, "GetAlbumFileListByAruid"}, | ||
| 131 | {103, nullptr, "DeleteAlbumFileByAruid"}, | ||
| 132 | {104, nullptr, "GetAlbumFileSizeByAruid"}, | ||
| 133 | {110, nullptr, "LoadAlbumScreenShotImageByAruid"}, | ||
| 134 | {120, nullptr, "LoadAlbumScreenShotThumbnailImageByAruid"}, | ||
| 135 | {60002, nullptr, "OpenAccessorSessionForApplication"}, | ||
| 136 | }; | ||
| 137 | // clang-format on | ||
| 138 | |||
| 139 | RegisterHandlers(functions); | ||
| 140 | } | ||
| 141 | }; | ||
| 142 | |||
| 143 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 144 | std::make_shared<CAPS_A>()->InstallAsService(sm); | ||
| 145 | std::make_shared<CAPS_C>()->InstallAsService(sm); | ||
| 146 | std::make_shared<CAPS_SC>()->InstallAsService(sm); | ||
| 147 | std::make_shared<CAPS_SS>()->InstallAsService(sm); | ||
| 148 | std::make_shared<CAPS_SU>()->InstallAsService(sm); | ||
| 149 | std::make_shared<CAPS_U>()->InstallAsService(sm); | ||
| 150 | } | ||
| 151 | |||
| 152 | } // namespace Service::Capture | ||
diff --git a/src/core/hle/service/caps/caps.h b/src/core/hle/service/caps/caps.h new file mode 100644 index 000000000..471185dfa --- /dev/null +++ b/src/core/hle/service/caps/caps.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::Capture { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 14 | |||
| 15 | } // namespace Service::Capture | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 747a2252e..828666e9b 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include "core/hle/service/bpc/bpc.h" | 24 | #include "core/hle/service/bpc/bpc.h" |
| 25 | #include "core/hle/service/btdrv/btdrv.h" | 25 | #include "core/hle/service/btdrv/btdrv.h" |
| 26 | #include "core/hle/service/btm/btm.h" | 26 | #include "core/hle/service/btm/btm.h" |
| 27 | #include "core/hle/service/caps/caps.h" | ||
| 27 | #include "core/hle/service/erpt/erpt.h" | 28 | #include "core/hle/service/erpt/erpt.h" |
| 28 | #include "core/hle/service/es/es.h" | 29 | #include "core/hle/service/es/es.h" |
| 29 | #include "core/hle/service/eupld/eupld.h" | 30 | #include "core/hle/service/eupld/eupld.h" |
| @@ -209,6 +210,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) { | |||
| 209 | BPC::InstallInterfaces(*sm); | 210 | BPC::InstallInterfaces(*sm); |
| 210 | BtDrv::InstallInterfaces(*sm); | 211 | BtDrv::InstallInterfaces(*sm); |
| 211 | BTM::InstallInterfaces(*sm); | 212 | BTM::InstallInterfaces(*sm); |
| 213 | Capture::InstallInterfaces(*sm); | ||
| 212 | ERPT::InstallInterfaces(*sm); | 214 | ERPT::InstallInterfaces(*sm); |
| 213 | ES::InstallInterfaces(*sm); | 215 | ES::InstallInterfaces(*sm); |
| 214 | EUPLD::InstallInterfaces(*sm); | 216 | EUPLD::InstallInterfaces(*sm); |