mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-06 11:18:51 -04:00
vi: move shared buffer management from nvnflinger
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/hle/service/nvdrv/nvdrv_interface.h"
|
||||
#include "core/hle/service/nvnflinger/hos_binder_driver.h"
|
||||
#include "core/hle/service/server_manager.h"
|
||||
#include "core/hle/service/sm/sm.h"
|
||||
#include "core/hle/service/vi/application_display_service.h"
|
||||
#include "core/hle/service/vi/application_root_service.h"
|
||||
#include "core/hle/service/vi/fbshare_buffer_manager.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"
|
||||
@@ -16,14 +18,22 @@ namespace Service::VI {
|
||||
void LoopProcess(Core::System& system) {
|
||||
const auto binder_service =
|
||||
system.ServiceManager().GetService<Nvnflinger::IHOSBinderDriver>("dispdrv", true);
|
||||
const auto nvdrv =
|
||||
system.ServiceManager().GetService<Nvidia::NVDRV>("nvdrv:s", true)->GetModule();
|
||||
const auto shared_buffer_manager =
|
||||
std::make_shared<FbshareBufferManager>(system, binder_service->GetSurfaceFlinger(), nvdrv);
|
||||
|
||||
auto server_manager = std::make_unique<ServerManager>(system);
|
||||
|
||||
server_manager->RegisterNamedService(
|
||||
"vi:m", std::make_shared<IManagerRootService>(system, binder_service));
|
||||
"vi:m",
|
||||
std::make_shared<IManagerRootService>(system, binder_service, shared_buffer_manager));
|
||||
server_manager->RegisterNamedService(
|
||||
"vi:s", std::make_shared<ISystemRootService>(system, binder_service));
|
||||
"vi:s",
|
||||
std::make_shared<ISystemRootService>(system, binder_service, shared_buffer_manager));
|
||||
server_manager->RegisterNamedService(
|
||||
"vi:u", std::make_shared<IApplicationRootService>(system, binder_service));
|
||||
"vi:u",
|
||||
std::make_shared<IApplicationRootService>(system, binder_service, shared_buffer_manager));
|
||||
ServerManager::RunServer(std::move(server_manager));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user