diff --git a/src/main.rs b/src/main.rs index 4d80ed0..cfc3613 100644 --- a/src/main.rs +++ b/src/main.rs @@ -394,6 +394,18 @@ fn run(config: &Config) -> Result<()> { player_state.pan_x = 0.0; player_state.pan_y = 0.0; } + sdl2::keyboard::Keycode::Comma | sdl2::keyboard::Keycode::Less => { + player_state.speed = (player_state.speed / 1.5).max(0.25); + info!("Speed: {:.2}x", player_state.speed); + } + sdl2::keyboard::Keycode::Period | sdl2::keyboard::Keycode::Greater => { + player_state.speed = (player_state.speed * 1.5).min(4.0); + info!("Speed: {:.2}x", player_state.speed); + } + sdl2::keyboard::Keycode::P => { + player_state.speed = 1.0; + info!("Speed: 1.0x"); + } _ => {} } } @@ -631,13 +643,10 @@ fn run(config: &Config) -> Result<()> { player_state.fps ); let line2 = format!( - "[S]ub {} [Y]olo {} [C]hunks [M]ute Zoom{:.1}x [F]ullscreen [`]Reset", - if player_state.show_subtitle { - "ON" - } else { - "OFF" - }, + "[S]ub {} [Y]olo {} [C]hunks [M]ute Spd{:.2}x Zoom{:.1}x [F]ullscreen [H]Help", + if player_state.show_subtitle { "ON" } else { "OFF" }, if player_state.show_yolo { "ON" } else { "OFF" }, + player_state.speed, player_state.zoom );