History

command: fix spammy events when frame stepping forward with seek

The frame-step command also signals on up events. This is only useful when using the default "play" mode. For seek mode, it triggers another frame step which is not what you want. Rearrange the logic so the up event is ignored for the seek flag. The frames check is also not needed since add_step_frame already handles it. Fixes 9661a3839ba5af79e5620ce87acedf6cdaa244c1

Dudemanguy committed 1 year ago

Commit c7c09fd1 parent 35447281 file · +4 −3Browse files

Unified · Split

player/command.c+4−3
@@ -5688,7 +5688,10 @@ static void cmd_frame_step(void *p) · 5687 unmodified lines
5688 return;5688 return;
5689 }5689 }
5690 5690
5691 if (frames > 0 && !flags && cmd->cmd->is_up_down) {5691 if (flags) {
5692 if (!cmd->cmd->is_up)
5693 add_step_frame(mpctx, frames, flags);
5694 } else {
5692 if (cmd->cmd->is_up) {5695 if (cmd->cmd->is_up) {
5693 if (mpctx->step_frames < 1)5696 if (mpctx->step_frames < 1)
5694 set_pause_state(mpctx, true);5697 set_pause_state(mpctx, true);
@@ -5699,8 +5702,6 @@ static void cmd_frame_step(void *p) · 4 unmodified lines
5699 add_step_frame(mpctx, frames, flags);5702 add_step_frame(mpctx, frames, flags);
5700 }5703 }
5701 }5704 }
5702 } else {
5703 add_step_frame(mpctx, frames, flags);
5704 }5705 }
5705}5706}
5706 5707

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t