summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar mailwl2018-02-02 12:59:50 +0300
committerGravatar mailwl2018-02-02 12:59:50 +0300
commit524c12a5f8fd1fcc9355351d1bcb08bfafaeb940 (patch)
tree3b2850a4ed7195f26d7b0bcd96d4580006b5fbca /src
parent[WIP] sfdnsres: stub (#146) (diff)
downloadyuzu-524c12a5f8fd1fcc9355351d1bcb08bfafaeb940.tar.gz
yuzu-524c12a5f8fd1fcc9355351d1bcb08bfafaeb940.tar.xz
yuzu-524c12a5f8fd1fcc9355351d1bcb08bfafaeb940.zip
Services/vi: add vi:s and vi:u services
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/hle/service/vi/vi.cpp4
-rw-r--r--src/core/hle/service/vi/vi_s.cpp31
-rw-r--r--src/core/hle/service/vi/vi_s.h29
-rw-r--r--src/core/hle/service/vi/vi_u.cpp31
-rw-r--r--src/core/hle/service/vi/vi_u.h29
6 files changed, 128 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 70a38ff6c..2e32ff35b 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -159,6 +159,10 @@ add_library(core STATIC
159 hle/service/vi/vi.h 159 hle/service/vi/vi.h
160 hle/service/vi/vi_m.cpp 160 hle/service/vi/vi_m.cpp
161 hle/service/vi/vi_m.h 161 hle/service/vi/vi_m.h
162 hle/service/vi/vi_s.cpp
163 hle/service/vi/vi_s.h
164 hle/service/vi/vi_u.cpp
165 hle/service/vi/vi_u.h
162 hle/shared_page.cpp 166 hle/shared_page.cpp
163 hle/shared_page.h 167 hle/shared_page.h
164 hw/hw.cpp 168 hw/hw.cpp
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 3b993f36c..e32ea1fb8 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -11,6 +11,8 @@
11#include "core/hle/service/nvflinger/buffer_queue.h" 11#include "core/hle/service/nvflinger/buffer_queue.h"
12#include "core/hle/service/vi/vi.h" 12#include "core/hle/service/vi/vi.h"
13#include "core/hle/service/vi/vi_m.h" 13#include "core/hle/service/vi/vi_m.h"
14#include "core/hle/service/vi/vi_s.h"
15#include "core/hle/service/vi/vi_u.h"
14#include "video_core/renderer_base.h" 16#include "video_core/renderer_base.h"
15#include "video_core/video_core.h" 17#include "video_core/video_core.h"
16 18
@@ -756,6 +758,8 @@ IApplicationDisplayService::IApplicationDisplayService(
756void InstallInterfaces(SM::ServiceManager& service_manager, 758void InstallInterfaces(SM::ServiceManager& service_manager,
757 std::shared_ptr<NVFlinger::NVFlinger> nv_flinger) { 759 std::shared_ptr<NVFlinger::NVFlinger> nv_flinger) {
758 std::make_shared<VI_M>(nv_flinger)->InstallAsService(service_manager); 760 std::make_shared<VI_M>(nv_flinger)->InstallAsService(service_manager);
761 std::make_shared<VI_S>(nv_flinger)->InstallAsService(service_manager);
762 std::make_shared<VI_U>(nv_flinger)->InstallAsService(service_manager);
759} 763}
760 764
761} // namespace VI 765} // namespace VI
diff --git a/src/core/hle/service/vi/vi_s.cpp b/src/core/hle/service/vi/vi_s.cpp
new file mode 100644
index 000000000..dc2848a9c
--- /dev/null
+++ b/src/core/hle/service/vi/vi_s.cpp
@@ -0,0 +1,31 @@
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 "common/logging/log.h"
6#include "core/hle/ipc_helpers.h"
7#include "core/hle/service/vi/vi.h"
8#include "core/hle/service/vi/vi_s.h"
9
10namespace Service {
11namespace VI {
12
13void VI_S::GetDisplayService(Kernel::HLERequestContext& ctx) {
14 LOG_WARNING(Service, "(STUBBED) called");
15
16 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
17 rb.Push(RESULT_SUCCESS);
18 rb.PushIpcInterface<IApplicationDisplayService>(nv_flinger);
19}
20
21VI_S::VI_S(std::shared_ptr<NVFlinger::NVFlinger> nv_flinger)
22 : ServiceFramework("vi:s"), nv_flinger(std::move(nv_flinger)) {
23 static const FunctionInfo functions[] = {
24 {1, &VI_S::GetDisplayService, "GetDisplayService"},
25 {3, nullptr, "GetDisplayServiceWithProxyNameExchange"},
26 };
27 RegisterHandlers(functions);
28}
29
30} // namespace VI
31} // namespace Service
diff --git a/src/core/hle/service/vi/vi_s.h b/src/core/hle/service/vi/vi_s.h
new file mode 100644
index 000000000..6978fd700
--- /dev/null
+++ b/src/core/hle/service/vi/vi_s.h
@@ -0,0 +1,29 @@
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#include <memory>
8#include "core/hle/service/service.h"
9
10namespace Service {
11namespace NVFlinger {
12class NVFlinger;
13}
14
15namespace VI {
16
17class VI_S final : public ServiceFramework<VI_S> {
18public:
19 VI_S(std::shared_ptr<NVFlinger::NVFlinger> nv_flinger);
20 ~VI_S() = default;
21
22private:
23 void GetDisplayService(Kernel::HLERequestContext& ctx);
24
25 std::shared_ptr<NVFlinger::NVFlinger> nv_flinger;
26};
27
28} // namespace VI
29} // namespace Service
diff --git a/src/core/hle/service/vi/vi_u.cpp b/src/core/hle/service/vi/vi_u.cpp
new file mode 100644
index 000000000..95c4d9fd7
--- /dev/null
+++ b/src/core/hle/service/vi/vi_u.cpp
@@ -0,0 +1,31 @@
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 "common/logging/log.h"
6#include "core/hle/ipc_helpers.h"
7#include "core/hle/service/vi/vi.h"
8#include "core/hle/service/vi/vi_u.h"
9
10namespace Service {
11namespace VI {
12
13void VI_U::GetDisplayService(Kernel::HLERequestContext& ctx) {
14 LOG_WARNING(Service, "(STUBBED) called");
15
16 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
17 rb.Push(RESULT_SUCCESS);
18 rb.PushIpcInterface<IApplicationDisplayService>(nv_flinger);
19}
20
21VI_U::VI_U(std::shared_ptr<NVFlinger::NVFlinger> nv_flinger)
22 : ServiceFramework("vi:u"), nv_flinger(std::move(nv_flinger)) {
23 static const FunctionInfo functions[] = {
24 {0, &VI_U::GetDisplayService, "GetDisplayService"},
25 {3, nullptr, "GetDisplayServiceWithProxyNameExchange"},
26 };
27 RegisterHandlers(functions);
28}
29
30} // namespace VI
31} // namespace Service
diff --git a/src/core/hle/service/vi/vi_u.h b/src/core/hle/service/vi/vi_u.h
new file mode 100644
index 000000000..b3e9c094d
--- /dev/null
+++ b/src/core/hle/service/vi/vi_u.h
@@ -0,0 +1,29 @@
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#include <memory>
8#include "core/hle/service/service.h"
9
10namespace Service {
11namespace NVFlinger {
12class NVFlinger;
13}
14
15namespace VI {
16
17class VI_U final : public ServiceFramework<VI_U> {
18public:
19 VI_U(std::shared_ptr<NVFlinger::NVFlinger> nv_flinger);
20 ~VI_U() = default;
21
22private:
23 void GetDisplayService(Kernel::HLERequestContext& ctx);
24
25 std::shared_ptr<NVFlinger::NVFlinger> nv_flinger;
26};
27
28} // namespace VI
29} // namespace Service