mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-08 12:16:17 -04:00
Fix compile error & cleanup
This commit is contained in:
@@ -173,11 +173,10 @@ void unsubscribe(Subscription token);
|
||||
|
||||
/**
|
||||
* \brief Register a CVar and attach a change callback in one step.
|
||||
*
|
||||
*
|
||||
* Useful for pushing settings into external systems (e.g. aurora) from one place instead of
|
||||
* every UI setter. The callback fires only for runtime changes (see subscribe); the value
|
||||
* loaded from config or launch arguments does not fire it — the external system reads its
|
||||
* initial value itself at its own initialization.
|
||||
* every UI setter. The callback fires only for runtime changes (see subscribe); not when
|
||||
* loaded from config or launch arguments.
|
||||
*/
|
||||
template <ConfigValue T, typename Callback>
|
||||
requires std::invocable<Callback, const T&, const T&> Subscription Register(
|
||||
|
||||
@@ -483,9 +483,6 @@ static void LoadFromPath(const char* path) {
|
||||
const auto& key = el.key();
|
||||
auto configVar = RegisteredConfigVars.find(key);
|
||||
if (configVar == RegisteredConfigVars.end()) {
|
||||
DuskConfigLog.debug("Unknown key '{}' found in config! If this gets registered later, "
|
||||
"that's acceptable!",
|
||||
key);
|
||||
UnregisteredConfigVars.emplace(key, el.value());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1052,7 +1052,7 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
mDoAud_seStartMenu(kSoundItemChange);
|
||||
getSettings().game.touchTargeting.setValue(
|
||||
static_cast<TouchTargeting>(i));
|
||||
config::Save();
|
||||
config::save();
|
||||
});
|
||||
}
|
||||
pane.add_rml(fmt::format("<br/>Hybrid: {}<br/>Hold: {}<br/>Switch: {}",
|
||||
|
||||
Reference in New Issue
Block a user