Add an option to disable Autosave Notification (#6081)

This commit is contained in:
nclok1405
2026-01-03 22:48:58 +09:00
committed by GitHub
parent 6953edecee
commit 1e55c1295f
2 changed files with 11 additions and 3 deletions

View File

@@ -44,9 +44,11 @@ static void Autosave_PerformSave() {
Play_PerformSave(gPlayState);
// Send notification
Notification::Emit({
.message = "Game autosaved",
});
if (CVarGetInteger(CVAR_ENHANCEMENT("AutosaveNotification"), 1)) {
Notification::Emit({
.message = "Game autosaved",
});
}
}
static void Autosave_IntervalSave() {

View File

@@ -160,6 +160,12 @@ void SohMenu::AddMenuEnhancements() {
"autosave will wait if the game is paused in any way (dialogue, pause screen up, cutscenes, "
"etc.).\n\n"
"The soft-reset save will *not* trigger in cutscene maps like the Chamber of Sages!"));
AddWidget(path, "Notification on Autosave", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("AutosaveNotification"))
.PreFunc([](WidgetInfo& info) { info.isHidden = !CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), 0); })
.RaceDisable(false)
.Options(CheckboxOptions().DefaultValue(true).Tooltip("Show a notification when the game is autosaved."));
AddWidget(path, "Remember Save Location", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("RememberSaveLocation"))
.Options(CheckboxOptions().Tooltip(