summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/lbl/lbl.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-24 02:32:32 +0100
committerGitHub <noreply@github.com>2024-02-24 02:32:32 +0100
commit6c40d75e47c7dc2d8ab5e11664cd40906f846de9 (patch)
treeb3af659a01c967e1a3082447a9ada02e5b055717 /src/core/hle/service/lbl/lbl.cpp
parentMerge pull request #13141 from liamwhite/swap (diff)
parentservice: audio: Add missing logging properties of SetHeadphoneOutputLevelMode (diff)
downloadyuzu-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.tar
yuzu-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.tar.gz
yuzu-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.tar.bz2
yuzu-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.tar.lz
yuzu-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.tar.xz
yuzu-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.tar.zst
yuzu-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.zip
Diffstat (limited to 'src/core/hle/service/lbl/lbl.cpp')
-rw-r--r--src/core/hle/service/lbl/lbl.cpp31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/core/hle/service/lbl/lbl.cpp b/src/core/hle/service/lbl/lbl.cpp
index 98a79365d..c14b24142 100644
--- a/src/core/hle/service/lbl/lbl.cpp
+++ b/src/core/hle/service/lbl/lbl.cpp
@@ -18,8 +18,8 @@ public:
explicit LBL(Core::System& system_) : ServiceFramework{system_, "lbl"} {
// clang-format off
static const FunctionInfo functions[] = {
- {0, nullptr, "SaveCurrentSetting"},
- {1, nullptr, "LoadCurrentSetting"},
+ {0, &LBL::SaveCurrentSetting, "SaveCurrentSetting"},
+ {1, &LBL::LoadCurrentSetting, "LoadCurrentSetting"},
{2, &LBL::SetCurrentBrightnessSetting, "SetCurrentBrightnessSetting"},
{3, &LBL::GetCurrentBrightnessSetting, "GetCurrentBrightnessSetting"},
{4, nullptr, "ApplyCurrentBrightnessSettingToBacklight"},
@@ -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,20 @@ 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");
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(ResultSuccess);
+ }
+
void SetCurrentBrightnessSetting(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
auto brightness = rp.Pop<float>();
@@ -310,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;
@@ -317,7 +339,8 @@ private:
bool dimming = true;
bool backlight_enabled = true;
bool update_instantly = false;
- bool auto_brightness = false; // TODO(ogniK): Move to system settings
+ bool auto_brightness = false;
+ bool auto_brightness_supported = true; // TODO(ogniK): Move to system settings
};
void LoopProcess(Core::System& system) {