aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/grc/grc.cpp
blob: e8e901662d52419ecbbacb77075ee27b103c5488 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// 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

#include <memory>

#include "core/hle/service/grc/grc.h"
#include "core/hle/service/server_manager.h"
#include "core/hle/service/service.h"

namespace Service::GRC {

class GRC final : public ServiceFramework<GRC> {
public:
    explicit GRC(Core::System& system_) : ServiceFramework{system_, "grc:c"} {
        // clang-format off
        static const FunctionInfo functions[] = {
            {1, nullptr, "OpenContinuousRecorder"},
            {2, nullptr, "OpenGameMovieTrimmer"},
            {3, nullptr, "OpenOffscreenRecorder"},
            {101, nullptr, "CreateMovieMaker"},
            {9903, nullptr, "SetOffscreenRecordingMarker"}
        };
        // clang-format on

        RegisterHandlers(functions);
    }
};

class GRC_D final : public ServiceFramework<GRC_D> {
public:
    explicit GRC_D(Core::System& system_) : ServiceFramework{system_, "grc:d"} {
        // clang-format off
        static const FunctionInfo functions[] = {
            {1, nullptr, "Initialize"},
            {2, nullptr, "Transfer"},
            {3, nullptr, "Cmd3"},
        };
        // clang-format on
        RegisterHandlers(functions);
    }
};

void LoopProcess(Core::System& system) {
    auto server_manager = std::make_unique<ServerManager>(system);

    server_manager->RegisterNamedService("grc:c", std::make_shared<GRC>(system), 4);
    server_manager->RegisterNamedService("grc:d", std::make_shared<GRC_D>(system), 4);
    ServerManager::RunServer(std::move(server_manager));
}

} // namespace Service::GRC