Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
player: add framerate based backward/forward step support
Browse files Browse the repository at this point in the history
Uses the 'o' and 'p' key to step backward/forward.
  • Loading branch information
mbouron authored and mbouron-gpsw committed Dec 1, 2021
1 parent 9877489 commit c22be9f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sxplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ static int key_callback(struct player *p, SDL_KeyboardEvent *event)
case SDLK_RIGHT:
update_time(p, clipi64(p->frame_ts + 10 * 1000000, 0, p->duration));
break;
case SDLK_o:
p->paused = 1;
set_frame_index(p, clipi64(p->frame_index - 1, 0, p->duration_i));
break;
case SDLK_p:
p->paused = 1;
set_frame_index(p, clipi64(p->frame_index + 1, 0, p->duration_i));
break;
case SDLK_s:
case SDLK_PERIOD:
p->paused = 1;
Expand Down

0 comments on commit c22be9f

Please sign in to comment.