Skip to content

Commit f7c0a22

Browse files
committed
fix: small fix in the case of a missing settings file
1 parent f6974a4 commit f7c0a22

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/manager/settings_manager.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ SettingsManager::SettingsManager(ServiceProvider* service_provider) : m_service_
1414
if (result.has_value()) {
1515
m_settings = result.value();
1616
} else {
17-
spdlog::error("unable to load settings from \"{}\": {}", detail::settings_filename, result.error());
17+
spdlog::warn("unable to load settings from \"{}\": {}", detail::settings_filename, result.error());
1818
spdlog::warn("applying default settings");
1919

2020
m_settings = {
21-
detail::Settings{ {}, std::nullopt, 1.0, false }
21+
detail::Settings{ .controls = {}, .selected = std::nullopt, .volume = 1.0, .discord = false }
2222
};
23+
24+
//TODO(Totto): save the file, if it doesn't exist, if it has an error, just leave it there
2325
}
2426
}
2527

0 commit comments

Comments
 (0)