clementgallet / libTAS

GNU/Linux software to (hopefully) give TAS tools to games
GNU General Public License v3.0
494 stars 56 forks source link

Advance/rewind on mouse wheel + RMB #594

Closed vadosnaprimer closed 4 months ago

vadosnaprimer commented 7 months ago

This way of advancing/rewidning was invented in TASEditor, and TAStudio adopted it too because it's very effifient: you don't have to repeat hitting the same button.

Right-click usually calls context menu, so it should be tweaked to only appear when right-clicking the frame column. Then on the rest of the input roll right click would do nothing, but it'd be a modifier key for mouse wheel.

So when holding RMB and scrolling down, you would advance frames, one by one every notch.

Ideally scrolling up would rewind the seek frame to the previous one, which would be equivalent to clicking the first column. Then emulation would start from the last valid savestate and run to that frame.

clementgallet commented 7 months ago

Good idea. I have one concern: on some games, frames can be rendered very slowly. So advancing frames with the mouse wheel should not buffer frame advance for each notch, because then you may have to wait for a long time before regaining control. So it would be more like: get one wheel event -> discard all remaining wheel events -> advance one frame -> get one wheel event, etc.

Edit: also, I'm not sure about rewind. What is the proportion of people that would use it, compared to the proportion of people that would trigger it by accident?

vadosnaprimer commented 7 months ago

In games that render very slowly this method may be less useful than simply clicking the first column to seek to the desired frame. But yeah wheel events should not be stacked and then fired, because that makes it very unpredictable. Only accepting the first event after the wait is the most logical.

By accident you mean during frame advancing? I don't remember ever accidentally scrolling in the wrong direction, and I use input roll editing since 2011.