minor fixes

This commit is contained in:
2025-12-23 20:24:50 +01:00
parent a7a3ae9055
commit d28feb3276
3 changed files with 87 additions and 45 deletions

View File

@ -21,7 +21,11 @@ std::string Settings::getSettingsPath() {
bool Settings::load() {
std::ifstream file(getSettingsPath());
if (!file.is_open()) {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Settings file not found, using defaults");
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Settings file not found, using defaults. Creating settings file with defaults.");
// Persist defaults so next run has an explicit settings.ini
try {
save();
} catch (...) {}
return false;
}

View File

@ -48,7 +48,8 @@ private:
Settings& operator=(const Settings&) = delete;
// Settings values
bool m_fullscreen = false;
// Default to fullscreen on first run when no settings.ini exists
bool m_fullscreen = true;
bool m_musicEnabled = true;
bool m_soundEnabled = true;
bool m_debugEnabled = false;