Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autosave interval setting #1714

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

Flamefire
Copy link
Member

@Flamefire Flamefire commented Nov 10, 2024

There is an off-by-one error when selecting the auto save interval:

  • Entry 0 is "disabled"
  • Entry 1 corresponds to index 0 in the interval array
  • Hence the maximum valid value is size()

The code checked for >= size() and applied the "every GF" setting that
is the last entry.

Fix is to simply use > size() as the check.

Fixes #1713

The new layout of the save window after the refactoring looks like this:
Unbenannt

There is an off-by-one error when selecting the auto save interval:
- Entry 0 is "disabled"
- Entry 1 corresponds to index 0 in the interval array
- Hence the maximum valid value is size()

The code checked for >= size() and applied the "every GF" setting that
is the last entry.

Fix is to simply use `> size()` as the check.

Fixes Return-To-The-Roots#1713
- Use enum as named IDs
- Move more into the base class, like adding the edit and button
- Show the savegame path for both save & load window
- Update and translate comments
@Flow86 Flow86 merged commit 14c63f8 into Return-To-The-Roots:master Nov 11, 2024
21 checks passed
@Flamefire Flamefire deleted the fix-autosave branch November 11, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting auto-save interval to 90 minutes saves every game frame
2 participants