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

Savestates (and branches in TAStudio) are 0-indexed #3112

Closed
Morilli opened this issue Jan 30, 2022 · 6 comments
Closed

Savestates (and branches in TAStudio) are 0-indexed #3112

Morilli opened this issue Jan 30, 2022 · 6 comments
Labels
App: EmuHawk Relating to EmuHawk frontend Meta Relating to code organisation or to things that aren't code Repro: Fixed/added in 2.9 Tool: TAStudio
Milestone

Comments

@Morilli
Copy link
Collaborator

Morilli commented Jan 30, 2022

Not sure whether it's just me or I am missing something, but I feel like it would make more sense if savestates and branches were 1-indexed instead of 0-indexed, aka the first savestate/branch is 1, the second 2, and so forth.

Main reasoning for me personally is that I like to make and load TAStudio branches via the savestate hotkeys (F1-F10 to load and Shift+F1-F10 to save), and I can either not save branch 0 comfortably, or I offset my hotkeys by 1 (aka F1 loads branch 0, F2 loads branch 1, etc.), which is also weird to keep in mind all the time.

Idk, maybe you're supposed to treat branch 0 as something special or something, but in my workflow at least it is just the first branch to me.

@YoshiRulz
Copy link
Member

YoshiRulz commented Jan 31, 2022

see also #2023

edit: I didn't understand this fully when triaging. Now that I do, I'm going to call it a bug because it's so user-hostile.
The savestate slots are drawn in the status bar and File > Save/Load State (but not File > Save Slot!) from 1, and the default hotkeys are from F1 (F1 = 1, F2 = 2...). In all but name, slot 0 is the 10th slot (ApiHawk/Lua complicates this).
In TAStudio, the branches are numbered from 0, and the default hotkeys are from F10 (F10 = 0, F1 = 1...)—though trying to save branch n will fill branches 0..(n-1) first.
I propose we:

  • Rename slot 0 to 10 in the UI, including reordering the hotkey binds and File > Save Slot, and savestate filenames
  • Change the savestate APIs to accept either 0 or 10 for slot 10, then in a later release deprecate accepting 0
  • Rename TAStudio branch 0 to 1, 1 to 2, etc.

@YoshiRulz YoshiRulz added App: EmuHawk Relating to EmuHawk frontend Meta Relating to code organisation or to things that aren't code Tool: TAStudio labels Jan 31, 2022
@TizianoMattei
Copy link

TizianoMattei commented Jan 31, 2022

Personally i use the save/load state/branch nr.0 to be exclusively assigned to controller keybinds (which leaves f1 to f10 the rest of states), whenever im testing something before, or even during the works of a TAS, depending on the situation

That said it wouldnt be that big of a problem if that ends up being changed

@YoshiRulz YoshiRulz added this to the 2.8 milestone Jan 31, 2022
@Morilli
Copy link
Collaborator Author

Morilli commented Jan 31, 2022

Personally i use the save/load state/branch nr.0 to be exclusively assigned to controller keybinds (which leaves f1 to f10 the rest of states)

You mean F1-F9 for the remaining states, right? Considering that there are only 10 savestates hotkeyable. In that case just using the 10th savestate instead of the 0th should work for you, although that is perhaps a little less "separated" logically.

@TizianoMattei
Copy link

You mean F1-F9 for the remaining states, right? Considering that there are only 10 savestates hotkeyable. In that case just using the 10th savestate instead of the 0th should work for you, although that is perhaps a little less "separated" logically.

Yes, apologies, i meant that.
Yea that would work, just shared to give a perspective on how some of the userbase might have used the save/load state 0

YoshiRulz added a commit that referenced this issue Feb 9, 2022
@YoshiRulz
Copy link
Member

Partially implemented my suggestions in e7fd93b and 965cbe6. Please test the latter.

@YoshiRulz YoshiRulz added the Repro: Patch pending Potentially fixed in dev build, see readme for download label Feb 9, 2022
@Morilli

This comment was marked as resolved.

YoshiRulz added a commit that referenced this issue Feb 9, 2022
@YoshiRulz YoshiRulz added Repro: Fixed/added in 2.9 and removed Repro: Patch pending Potentially fixed in dev build, see readme for download labels Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: EmuHawk Relating to EmuHawk frontend Meta Relating to code organisation or to things that aren't code Repro: Fixed/added in 2.9 Tool: TAStudio
Projects
None yet
Development

No branches or pull requests

3 participants