mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-30 13:24:16 +01:00
service/mvd: Migrate to ServiceFramework (#3890)
* service/mvd: Migrate to ServiceFramework * service/mvd: Silenced clang format
This commit is contained in:
parent
3e42b361b1
commit
db75b80e22
@ -4,13 +4,12 @@
|
|||||||
|
|
||||||
#include "core/hle/service/mvd/mvd.h"
|
#include "core/hle/service/mvd/mvd.h"
|
||||||
#include "core/hle/service/mvd/mvd_std.h"
|
#include "core/hle/service/mvd/mvd_std.h"
|
||||||
#include "core/hle/service/service.h"
|
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
namespace MVD {
|
namespace MVD {
|
||||||
|
|
||||||
void Init() {
|
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||||
AddService(new MVD_STD());
|
std::make_shared<MVD_STD>()->InstallAsService(service_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace MVD
|
} // namespace MVD
|
||||||
|
@ -4,11 +4,13 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
namespace MVD {
|
namespace MVD {
|
||||||
|
|
||||||
/// Initializes all MVD services.
|
/// Initializes all MVD services.
|
||||||
void Init();
|
void InstallInterfaces(SM::ServiceManager& service_manager);
|
||||||
|
|
||||||
} // namespace MVD
|
} // namespace MVD
|
||||||
} // namespace Service
|
} // namespace Service
|
||||||
|
@ -2,12 +2,14 @@
|
|||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "core/hle/ipc_helpers.h"
|
||||||
#include "core/hle/service/mvd/mvd_std.h"
|
#include "core/hle/service/mvd/mvd_std.h"
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
namespace MVD {
|
namespace MVD {
|
||||||
|
|
||||||
const Interface::FunctionInfo FunctionTable[] = {
|
MVD_STD::MVD_STD() : ServiceFramework("mvd:std", 1) {
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
{0x00010082, nullptr, "Initialize"},
|
{0x00010082, nullptr, "Initialize"},
|
||||||
{0x00020000, nullptr, "Shutdown"},
|
{0x00020000, nullptr, "Shutdown"},
|
||||||
@ -22,11 +24,10 @@ const Interface::FunctionInfo FunctionTable[] = {
|
|||||||
{0x001F0902, nullptr, "SetOutputBuffer"},
|
{0x001F0902, nullptr, "SetOutputBuffer"},
|
||||||
{0x00210100, nullptr, "OverrideOutputBuffers"}
|
{0x00210100, nullptr, "OverrideOutputBuffers"}
|
||||||
// clang-format on
|
// clang-format on
|
||||||
};
|
};
|
||||||
|
|
||||||
MVD_STD::MVD_STD() {
|
RegisterHandlers(functions);
|
||||||
Register(FunctionTable);
|
};
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace MVD
|
} // namespace MVD
|
||||||
} // namespace Service
|
} // namespace Service
|
||||||
|
@ -9,13 +9,10 @@
|
|||||||
namespace Service {
|
namespace Service {
|
||||||
namespace MVD {
|
namespace MVD {
|
||||||
|
|
||||||
class MVD_STD final : public Interface {
|
class MVD_STD final : public ServiceFramework<MVD_STD> {
|
||||||
public:
|
public:
|
||||||
MVD_STD();
|
MVD_STD();
|
||||||
|
~MVD_STD() = default;
|
||||||
std::string GetPortName() const override {
|
|
||||||
return "mvd:std";
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace MVD
|
} // namespace MVD
|
||||||
|
@ -247,7 +247,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
|
|||||||
GSP::InstallInterfaces(*sm);
|
GSP::InstallInterfaces(*sm);
|
||||||
HID::InstallInterfaces(*sm);
|
HID::InstallInterfaces(*sm);
|
||||||
IR::InstallInterfaces(*sm);
|
IR::InstallInterfaces(*sm);
|
||||||
MVD::Init();
|
MVD::InstallInterfaces(*sm);
|
||||||
NDM::InstallInterfaces(*sm);
|
NDM::InstallInterfaces(*sm);
|
||||||
NEWS::InstallInterfaces(*sm);
|
NEWS::InstallInterfaces(*sm);
|
||||||
NFC::InstallInterfaces(*sm);
|
NFC::InstallInterfaces(*sm);
|
||||||
|
Loading…
Reference in New Issue
Block a user