diff options
author | Liam <byteslice@airmail.cc> | 2024-02-14 05:53:56 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-14 18:03:32 +0100 |
commit | c448001d4766a4959b4c1468b5a9de6dfe3d9bc4 (patch) | |
tree | e0c35c83cda5b104faa7c8f3757fbe28fe8b3f36 /src/core/hle/service/vi/vi.cpp | |
parent | vi: split into implementation files (diff) | |
download | yuzu-c448001d4766a4959b4c1468b5a9de6dfe3d9bc4.tar yuzu-c448001d4766a4959b4c1468b5a9de6dfe3d9bc4.tar.gz yuzu-c448001d4766a4959b4c1468b5a9de6dfe3d9bc4.tar.bz2 yuzu-c448001d4766a4959b4c1468b5a9de6dfe3d9bc4.tar.lz yuzu-c448001d4766a4959b4c1468b5a9de6dfe3d9bc4.tar.xz yuzu-c448001d4766a4959b4c1468b5a9de6dfe3d9bc4.tar.zst yuzu-c448001d4766a4959b4c1468b5a9de6dfe3d9bc4.zip |
Diffstat (limited to 'src/core/hle/service/vi/vi.cpp')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index bb84d27b3..304e589b7 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -1,49 +1,15 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "core/hle/service/ipc_helpers.h" #include "core/hle/service/server_manager.h" #include "core/hle/service/vi/application_display_service.h" #include "core/hle/service/vi/application_root_service.h" #include "core/hle/service/vi/manager_root_service.h" #include "core/hle/service/vi/system_root_service.h" #include "core/hle/service/vi/vi.h" -#include "core/hle/service/vi/vi_results.h" -#include "core/hle/service/vi/vi_types.h" namespace Service::VI { -static bool IsValidServiceAccess(Permission permission, Policy policy) { - if (permission == Permission::User) { - return policy == Policy::User; - } - - if (permission == Permission::System || permission == Permission::Manager) { - return policy == Policy::User || policy == Policy::Compositor; - } - - return false; -} - -void detail::GetDisplayServiceImpl(HLERequestContext& ctx, Core::System& system, - Nvnflinger::Nvnflinger& nvnflinger, - Nvnflinger::HosBinderDriverServer& hos_binder_driver_server, - Permission permission) { - IPC::RequestParser rp{ctx}; - const auto policy = rp.PopEnum<Policy>(); - - if (!IsValidServiceAccess(permission, policy)) { - LOG_ERROR(Service_VI, "Permission denied for policy {}", policy); - IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(ResultPermissionDenied); - return; - } - - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(ResultSuccess); - rb.PushIpcInterface<IApplicationDisplayService>(system, nvnflinger, hos_binder_driver_server); -} - void LoopProcess(Core::System& system, Nvnflinger::Nvnflinger& nvnflinger, Nvnflinger::HosBinderDriverServer& hos_binder_driver_server) { auto server_manager = std::make_unique<ServerManager>(system); |