diff options
| author | cooljqln <cooljqln@noreply.codeberg.org> | 2025-02-03 23:45:28 +0000 |
|---|---|---|
| committer | cooljqln <cooljqln@noreply.codeberg.org> | 2025-02-03 23:45:28 +0000 |
| commit | 38cb3d8219da0d26077d238c3e633f75a11055a3 (patch) | |
| tree | 7279ecbf1be6e7384e3a90c15153863ae1cf994f /src/tangara/lua/lua_controls.cpp | |
| parent | 28846b989b75ca6fe513462c209ce95bce2a46b7 (diff) | |
| parent | 546daf71c1b04284848c4b5edfbaa3c5b4a284f4 (diff) | |
| download | tangara-fw-38cb3d8219da0d26077d238c3e633f75a11055a3.tar.gz | |
Merge pull request 'Add optional support for adjusting volume while locked' (#230) from teisenbe/tangara-fw:locked_input into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/230
Diffstat (limited to 'src/tangara/lua/lua_controls.cpp')
| -rw-r--r-- | src/tangara/lua/lua_controls.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tangara/lua/lua_controls.cpp b/src/tangara/lua/lua_controls.cpp index baf40891..87b7ca16 100644 --- a/src/tangara/lua/lua_controls.cpp +++ b/src/tangara/lua/lua_controls.cpp @@ -42,7 +42,24 @@ static auto controls_schemes(lua_State* L) -> int { return 1; } +static auto locked_controls_schemes(lua_State* L) -> int { + lua_newtable(L); + + lua_pushliteral(L, "Disabled"); + lua_rawseti( + L, -2, + static_cast<int>(drivers::NvsStorage::LockedInputModes::kDisabled)); + + lua_pushliteral(L, "Volume Only"); + lua_rawseti( + L, -2, + static_cast<int>(drivers::NvsStorage::LockedInputModes::kVolumeOnly)); + + return 1; +} + static const struct luaL_Reg kControlsFuncs[] = {{"schemes", controls_schemes}, + {"locked_schemes", locked_controls_schemes}, {NULL, NULL}}; static auto lua_controls(lua_State* state) -> int { |
