diff options
| author | 2023-03-01 10:38:20 -0500 | |
|---|---|---|
| committer | 2023-03-01 10:38:20 -0500 | |
| commit | 97f7a560f3905a1dd6a4e5a0a308ea752004bf08 (patch) | |
| tree | e60a69f96d16d051220b66e90906a7abeacf1064 /src/core/hle/service/vi | |
| parent | Merge pull request #9879 from zhaobot/tx-update-20230301024940 (diff) | |
| parent | sm:: fix lingering session initialization issues (diff) | |
| download | yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.gz yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.xz yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.zip | |
Merge pull request #9832 from liamwhite/hle-mp
service: HLE multiprocess
Diffstat (limited to 'src/core/hle/service/vi')
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 24 | ||||
| -rw-r--r-- | src/core/hle/service/vi/vi.h | 10 |
2 files changed, 15 insertions, 19 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 0915785d2..d9cfebd70 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include "core/hle/service/nvflinger/hos_binder_driver_server.h" | 26 | #include "core/hle/service/nvflinger/hos_binder_driver_server.h" |
| 27 | #include "core/hle/service/nvflinger/nvflinger.h" | 27 | #include "core/hle/service/nvflinger/nvflinger.h" |
| 28 | #include "core/hle/service/nvflinger/parcel.h" | 28 | #include "core/hle/service/nvflinger/parcel.h" |
| 29 | #include "core/hle/service/server_manager.h" | ||
| 29 | #include "core/hle/service/service.h" | 30 | #include "core/hle/service/service.h" |
| 30 | #include "core/hle/service/vi/vi.h" | 31 | #include "core/hle/service/vi/vi.h" |
| 31 | #include "core/hle/service/vi/vi_m.h" | 32 | #include "core/hle/service/vi/vi_m.h" |
| @@ -73,8 +74,7 @@ static_assert(sizeof(NativeWindow) == 0x28, "NativeWindow has wrong size"); | |||
| 73 | class IHOSBinderDriver final : public ServiceFramework<IHOSBinderDriver> { | 74 | class IHOSBinderDriver final : public ServiceFramework<IHOSBinderDriver> { |
| 74 | public: | 75 | public: |
| 75 | explicit IHOSBinderDriver(Core::System& system_, NVFlinger::HosBinderDriverServer& server_) | 76 | explicit IHOSBinderDriver(Core::System& system_, NVFlinger::HosBinderDriverServer& server_) |
| 76 | : ServiceFramework{system_, "IHOSBinderDriver", ServiceThreadType::CreateNew}, | 77 | : ServiceFramework{system_, "IHOSBinderDriver"}, server(server_) { |
| 77 | server(server_) { | ||
| 78 | static const FunctionInfo functions[] = { | 78 | static const FunctionInfo functions[] = { |
| 79 | {0, &IHOSBinderDriver::TransactParcel, "TransactParcel"}, | 79 | {0, &IHOSBinderDriver::TransactParcel, "TransactParcel"}, |
| 80 | {1, &IHOSBinderDriver::AdjustRefcount, "AdjustRefcount"}, | 80 | {1, &IHOSBinderDriver::AdjustRefcount, "AdjustRefcount"}, |
| @@ -809,15 +809,17 @@ void detail::GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& | |||
| 809 | rb.PushIpcInterface<IApplicationDisplayService>(system, nv_flinger, hos_binder_driver_server); | 809 | rb.PushIpcInterface<IApplicationDisplayService>(system, nv_flinger, hos_binder_driver_server); |
| 810 | } | 810 | } |
| 811 | 811 | ||
| 812 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system, | 812 | void LoopProcess(Core::System& system, NVFlinger::NVFlinger& nv_flinger, |
| 813 | NVFlinger::NVFlinger& nv_flinger, | 813 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server) { |
| 814 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server) { | 814 | auto server_manager = std::make_unique<ServerManager>(system); |
| 815 | std::make_shared<VI_M>(system, nv_flinger, hos_binder_driver_server) | 815 | |
| 816 | ->InstallAsService(service_manager); | 816 | server_manager->RegisterNamedService( |
| 817 | std::make_shared<VI_S>(system, nv_flinger, hos_binder_driver_server) | 817 | "vi:m", std::make_shared<VI_M>(system, nv_flinger, hos_binder_driver_server)); |
| 818 | ->InstallAsService(service_manager); | 818 | server_manager->RegisterNamedService( |
| 819 | std::make_shared<VI_U>(system, nv_flinger, hos_binder_driver_server) | 819 | "vi:s", std::make_shared<VI_S>(system, nv_flinger, hos_binder_driver_server)); |
| 820 | ->InstallAsService(service_manager); | 820 | server_manager->RegisterNamedService( |
| 821 | "vi:u", std::make_shared<VI_U>(system, nv_flinger, hos_binder_driver_server)); | ||
| 822 | ServerManager::RunServer(std::move(server_manager)); | ||
| 821 | } | 823 | } |
| 822 | 824 | ||
| 823 | } // namespace Service::VI | 825 | } // namespace Service::VI |
diff --git a/src/core/hle/service/vi/vi.h b/src/core/hle/service/vi/vi.h index fc2d717e7..4ed7aaf2b 100644 --- a/src/core/hle/service/vi/vi.h +++ b/src/core/hle/service/vi/vi.h | |||
| @@ -18,10 +18,6 @@ class HosBinderDriverServer; | |||
| 18 | class NVFlinger; | 18 | class NVFlinger; |
| 19 | } // namespace Service::NVFlinger | 19 | } // namespace Service::NVFlinger |
| 20 | 20 | ||
| 21 | namespace Service::SM { | ||
| 22 | class ServiceManager; | ||
| 23 | } | ||
| 24 | |||
| 25 | namespace Service::VI { | 21 | namespace Service::VI { |
| 26 | 22 | ||
| 27 | enum class DisplayResolution : u32 { | 23 | enum class DisplayResolution : u32 { |
| @@ -52,9 +48,7 @@ void GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& system, | |||
| 52 | Permission permission); | 48 | Permission permission); |
| 53 | } // namespace detail | 49 | } // namespace detail |
| 54 | 50 | ||
| 55 | /// Registers all VI services with the specified service manager. | 51 | void LoopProcess(Core::System& system, NVFlinger::NVFlinger& nv_flinger, |
| 56 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system, | 52 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server); |
| 57 | NVFlinger::NVFlinger& nv_flinger, | ||
| 58 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server); | ||
| 59 | 53 | ||
| 60 | } // namespace Service::VI | 54 | } // namespace Service::VI |