mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
Merge pull request #3887 from NarcolepticK/gsp_lcd-migrate-framework
service/gsp: Migrate gsp_lcd to ServiceFramework
This commit is contained in:
commit
1619b124b5
@ -27,8 +27,9 @@ void SignalInterrupt(InterruptId interrupt_id) {
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||
auto gpu = std::make_shared<GSP_GPU>();
|
||||
gpu->InstallAsService(service_manager);
|
||||
|
||||
gsp_gpu = gpu;
|
||||
|
||||
std::make_shared<GSP_LCD>()->InstallAsService(service_manager);
|
||||
}
|
||||
|
||||
} // namespace GSP
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/gsp/gsp_gpu.h"
|
||||
#include "core/hle/service/gsp/gsp_lcd.h"
|
||||
|
||||
namespace Service {
|
||||
namespace GSP {
|
||||
|
@ -2,28 +2,26 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/service/gsp/gsp_lcd.h"
|
||||
|
||||
namespace Service {
|
||||
namespace GSP {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
// clang-format off
|
||||
{0x000A0080, nullptr, "SetBrightnessRaw"},
|
||||
{0x000B0080, nullptr, "SetBrightness"},
|
||||
{0x000F0000, nullptr, "PowerOnAllBacklights"},
|
||||
{0x00100000, nullptr, "PowerOffAllBacklights"},
|
||||
{0x00110040, nullptr, "PowerOnBacklight"},
|
||||
{0x00120040, nullptr, "PowerOffBacklight"},
|
||||
{0x00130040, nullptr, "SetLedForceOff"},
|
||||
{0x00140000, nullptr, "GetVendor"},
|
||||
{0x00150040, nullptr, "GetBrightness"},
|
||||
// clang-format on
|
||||
GSP_LCD::GSP_LCD() : ServiceFramework("gsp::Lcd") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x000A0080, nullptr, "SetBrightnessRaw"},
|
||||
{0x000B0080, nullptr, "SetBrightness"},
|
||||
{0x000F0000, nullptr, "PowerOnAllBacklights"},
|
||||
{0x00100000, nullptr, "PowerOffAllBacklights"},
|
||||
{0x00110040, nullptr, "PowerOnBacklight"},
|
||||
{0x00120040, nullptr, "PowerOffBacklight"},
|
||||
{0x00130040, nullptr, "SetLedForceOff"},
|
||||
{0x00140000, nullptr, "GetVendor"},
|
||||
{0x00150040, nullptr, "GetBrightness"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
};
|
||||
|
||||
GSP_LCD::GSP_LCD() {
|
||||
Register(FunctionTable);
|
||||
}
|
||||
|
||||
} // namespace GSP
|
||||
} // namespace Service
|
||||
|
@ -9,13 +9,10 @@
|
||||
namespace Service {
|
||||
namespace GSP {
|
||||
|
||||
class GSP_LCD final : public Interface {
|
||||
class GSP_LCD final : public ServiceFramework<GSP_LCD> {
|
||||
public:
|
||||
GSP_LCD();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "gsp::Lcd";
|
||||
}
|
||||
~GSP_LCD() = default;
|
||||
};
|
||||
|
||||
} // namespace GSP
|
||||
|
@ -258,7 +258,6 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
|
||||
|
||||
AddService(new CSND::CSND_SND);
|
||||
AddService(new DSP_DSP::Interface);
|
||||
AddService(new GSP::GSP_LCD);
|
||||
AddService(new HTTP::HTTP_C);
|
||||
AddService(new PM::PM_APP);
|
||||
AddService(new SOC::SOC_U);
|
||||
|
Loading…
Reference in New Issue
Block a user