Files
eden/src/core/hle/service/caps/caps.cpp
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
2.4 KiB
C++
Raw Normal View History

// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2018-08-01 16:24:03 -04:00
#include "core/hle/service/caps/caps.h"
#include "core/hle/service/caps/caps_a.h"
#include "core/hle/service/caps/caps_c.h"
#include "core/hle/service/caps/caps_manager.h"
#include "core/hle/service/caps/caps_sc.h"
#include "core/hle/service/caps/caps_ss.h"
#include "core/hle/service/caps/caps_su.h"
#include "core/hle/service/caps/caps_u.h"
2023-02-18 16:26:48 -05:00
#include "core/hle/service/server_manager.h"
2018-08-01 16:24:03 -04:00
#include "core/hle/service/service.h"
#include "frontend_common/firmware_manager.h"
2018-08-01 16:24:03 -04:00
namespace Service::Capture {
class IDecoderControlService final : public ServiceFramework<IDecoderControlService> {
public:
2026-09-25 15:57:13 +00:00
explicit IDecoderControlService(Core::System& system_) : ServiceFramework{system_, "grc:d"} {}
2026-09-26 06:34:09 +00:00
static constexpr auto functions = CreateStaticMap(
2026-09-25 15:53:30 +00:00
FunctionInfo{3001, nullptr, "DecodeJpeg"},
FunctionInfo{4001, nullptr, "ShrinkJpeg"},
FunctionInfo{4002, nullptr, "ShrinkJpegEx"}
2026-09-25 15:57:13 +00:00
);
2026-09-26 06:34:09 +00:00
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
};
2023-02-18 16:26:48 -05:00
void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system);
auto album_manager = std::make_shared<AlbumManager>(system);
server_manager->RegisterNamedService("caps:a", std::make_shared<IAlbumAccessorService>(system, album_manager));
server_manager->RegisterNamedService("caps:c", std::make_shared<IAlbumControlService>(system, album_manager));
server_manager->RegisterNamedService("caps:u", std::make_shared<IAlbumApplicationService>(system, album_manager));
server_manager->RegisterNamedService("caps:ss", std::make_shared<IScreenShotService>(system, album_manager));
server_manager->RegisterNamedService("caps:sc", std::make_shared<IScreenShotControlService>(system));
server_manager->RegisterNamedService("caps:su", std::make_shared<IScreenShotApplicationService>(system, album_manager));
// +4.0.0
if (FirmwareManager::GetFirmwareVersion(system).first.major >= 4) {
server_manager->RegisterNamedService("caps:dc", std::make_shared<IDecoderControlService>(system));
}
2023-02-18 16:26:48 -05:00
ServerManager::RunServer(std::move(server_manager));
2018-08-01 16:24:03 -04:00
}
} // namespace Service::Capture