Skip to content

Commit

Permalink
Make frame-advance auto-repeat faster when holding fastforward
Browse files Browse the repository at this point in the history
  • Loading branch information
clementgallet committed Mar 14, 2018
1 parent 7054f0d commit ae94f0a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
- Simulate a specific monitor resolution.
- Improve fastforward by skipping OpenGL draw functions.
- Initialize allocated memory with zeros, fixing desyncs in some games.
- Add author field in movie files
- Add author field in movie files.
- Add an option to pause at a specific frame.

### Changed
- Don't rely on the keyboard layout to determine keycodes from keysyms when feeding inputs to the game. Now using a standard qwerty keyboard layout.
- Changed the way to store the game screen when using OpenGL (using framebuffers and renderbuffers). Now the screen capture stays inside the GPU, except when doing an encode.

### Fixed
- Always display the last frame of a movie during a fast-forward, so that a TAS can be more easily resumed.
- Movie file browser does not ask for overwrite confirmation anymore
- Movie file browser does not ask for overwrite confirmation anymore.
- Add an extra movie frame corresponding to the game startup, so that frame count and system time now match. Old movies will desync, the user needs to add one blank frame at the beginning.
- Using both frame-advance and fast-forward now produces a faster frame-advance running speed.

## [1.1.0] - 2018-02-25
### Added
Expand Down
8 changes: 8 additions & 0 deletions src/linTAS/GameLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,10 @@ bool GameLoop::processEvent(uint8_t type, struct HotKey &hk)
context->config.sc.fastforward = true;
emit sharedConfigChanged();
context->config.sc_modified = true;

/* Make frame advance auto-repeat faster */
ar_freq = 1;

return false;

case HOTKEY_SAVESTATE1:
Expand Down Expand Up @@ -823,6 +827,10 @@ bool GameLoop::processEvent(uint8_t type, struct HotKey &hk)
context->config.sc.fastforward = false;
emit sharedConfigChanged();
context->config.sc_modified = true;

/* Recover normal frame-advance auto-repeat */
ar_freq = 1;

return false;
case HOTKEY_FRAMEADVANCE:
ar_ticks = -1; // Deactivate auto-repeat
Expand Down

0 comments on commit ae94f0a

Please sign in to comment.