service: Add even more stubs for Qlaunch

This commit is contained in:
german77
2023-08-05 21:05:25 -06:00
committed by Narr the Reg
parent 7486e214bf
commit 17fb8f2f29
28 changed files with 924 additions and 65 deletions

View File

@ -18,7 +18,7 @@ public:
explicit LBL(Core::System& system_) : ServiceFramework{system_, "lbl"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "SaveCurrentSetting"},
{0, &LBL::SaveCurrentSetting, "SaveCurrentSetting"},
{1, &LBL::LoadCurrentSetting, "LoadCurrentSetting"},
{2, &LBL::SetCurrentBrightnessSetting, "SetCurrentBrightnessSetting"},
{3, &LBL::GetCurrentBrightnessSetting, "GetCurrentBrightnessSetting"},
@ -47,7 +47,7 @@ public:
{26, &LBL::EnableVrMode, "EnableVrMode"},
{27, &LBL::DisableVrMode, "DisableVrMode"},
{28, &LBL::IsVrModeEnabled, "IsVrModeEnabled"},
{29, nullptr, "IsAutoBrightnessControlSupported"},
{29, &LBL::IsAutoBrightnessControlSupported, "IsAutoBrightnessControlSupported"},
};
// clang-format on
@ -60,6 +60,13 @@ private:
On = 1,
};
void SaveCurrentSetting(HLERequestContext& ctx) {
LOG_WARNING(Service_LBL, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
void LoadCurrentSetting(HLERequestContext& ctx) {
LOG_WARNING(Service_LBL, "(STUBBED) called");
@ -317,6 +324,14 @@ private:
rb.Push(vr_mode_enabled);
}
void IsAutoBrightnessControlSupported(HLERequestContext& ctx) {
LOG_DEBUG(Service_LBL, "called");
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.Push<u8>(auto_brightness_supported);
}
bool vr_mode_enabled = false;
float current_brightness = 1.0f;
float ambient_light_value = 0.0f;
@ -325,6 +340,7 @@ private:
bool backlight_enabled = true;
bool update_instantly = false;
bool auto_brightness = false; // TODO(ogniK): Move to system settings
bool auto_brightness_supported = true;
};
void LoopProcess(Core::System& system) {