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 9661a3839b
This commit is contained in:
Dudemanguy committed 2025-01-29 14:48:55 +00:00
1 parent 3544728991
commit c7c09fdb8b
1 file changed
+4 -3
+4 -3
View File
@@ -5688,7 +5688,10 @@ static void cmd_frame_step(void *p)
return;
}
if (frames > 0 && !flags && cmd->cmd->is_up_down) {
if (flags) {
if (!cmd->cmd->is_up)
add_step_frame(mpctx, frames, flags);
} else {
if (cmd->cmd->is_up) {
if (mpctx->step_frames < 1)
set_pause_state(mpctx, true);
@@ -5699,8 +5702,6 @@ static void cmd_frame_step(void *p)
add_step_frame(mpctx, frames, flags);
}
}
} else {
add_step_frame(mpctx, frames, flags);
}
}