diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-01 16:38:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 16:38:20 +0100 |
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 yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.gz yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.bz2 yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.lz yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.xz yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.zst yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.zip |
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 @@ #include "core/hle/service/nvflinger/hos_binder_driver_server.h" #include "core/hle/service/nvflinger/nvflinger.h" #include "core/hle/service/nvflinger/parcel.h" +#include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" #include "core/hle/service/vi/vi.h" #include "core/hle/service/vi/vi_m.h" @@ -73,8 +74,7 @@ static_assert(sizeof(NativeWindow) == 0x28, "NativeWindow has wrong size"); class IHOSBinderDriver final : public ServiceFramework<IHOSBinderDriver> { public: explicit IHOSBinderDriver(Core::System& system_, NVFlinger::HosBinderDriverServer& server_) - : ServiceFramework{system_, "IHOSBinderDriver", ServiceThreadType::CreateNew}, - server(server_) { + : ServiceFramework{system_, "IHOSBinderDriver"}, server(server_) { static const FunctionInfo functions[] = { {0, &IHOSBinderDriver::TransactParcel, "TransactParcel"}, {1, &IHOSBinderDriver::AdjustRefcount, "AdjustRefcount"}, @@ -809,15 +809,17 @@ void detail::GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& rb.PushIpcInterface<IApplicationDisplayService>(system, nv_flinger, hos_binder_driver_server); } -void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system, - NVFlinger::NVFlinger& nv_flinger, - NVFlinger::HosBinderDriverServer& hos_binder_driver_server) { - std::make_shared<VI_M>(system, nv_flinger, hos_binder_driver_server) - ->InstallAsService(service_manager); - std::make_shared<VI_S>(system, nv_flinger, hos_binder_driver_server) - ->InstallAsService(service_manager); - std::make_shared<VI_U>(system, nv_flinger, hos_binder_driver_server) - ->InstallAsService(service_manager); +void LoopProcess(Core::System& system, NVFlinger::NVFlinger& nv_flinger, + NVFlinger::HosBinderDriverServer& hos_binder_driver_server) { + auto server_manager = std::make_unique<ServerManager>(system); + + server_manager->RegisterNamedService( + "vi:m", std::make_shared<VI_M>(system, nv_flinger, hos_binder_driver_server)); + server_manager->RegisterNamedService( + "vi:s", std::make_shared<VI_S>(system, nv_flinger, hos_binder_driver_server)); + server_manager->RegisterNamedService( + "vi:u", std::make_shared<VI_U>(system, nv_flinger, hos_binder_driver_server)); + ServerManager::RunServer(std::move(server_manager)); } } // 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; class NVFlinger; } // namespace Service::NVFlinger -namespace Service::SM { -class ServiceManager; -} - namespace Service::VI { enum class DisplayResolution : u32 { @@ -52,9 +48,7 @@ void GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& system, Permission permission); } // namespace detail -/// Registers all VI services with the specified service manager. -void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system, - NVFlinger::NVFlinger& nv_flinger, - NVFlinger::HosBinderDriverServer& hos_binder_driver_server); +void LoopProcess(Core::System& system, NVFlinger::NVFlinger& nv_flinger, + NVFlinger::HosBinderDriverServer& hos_binder_driver_server); } // namespace Service::VI |