diff --git a/src/app.c b/src/app.c index 15bc799..e7e60df 100644 --- a/src/app.c +++ b/src/app.c @@ -12,7 +12,8 @@ #define GUIDE_BROWSE_STEP_MINUTES 30 #define GUIDE_BROWSE_MAX_AHEAD_MINUTES (12 * 60) #define GUIDE_BROWSE_MAX_OFFSET_MINUTES (GUIDE_BROWSE_MAX_AHEAD_MINUTES - ((int) (TIMELINE_VISIBLE_SECONDS / 60.0) - 30)) -#define CHANNEL_BANNER_DURATION_MS 3000 +#define CHANNEL_BANNER_DURATION_MS 5000 +#define CHANNEL_SWITCH_LOCK_DURATION_MS 7000 static void configure_runtime_environment(void) { char runtime_dir[64]; @@ -127,11 +128,18 @@ static int update_video_texture(App *app) { static void tune_relative(App *app, int delta) { int next_index; + Uint32 now; if (app->channels.count == 0) { return; } + now = SDL_GetTicks(); + if (now < app->channel_switch_lock_until) { + return; + } + app->channel_switch_lock_until = now + CHANNEL_SWITCH_LOCK_DURATION_MS; + next_index = app->player.current_index; if (next_index < 0) { next_index = 0; diff --git a/src/app.h b/src/app.h index 8e4239b..aaa871e 100644 --- a/src/app.h +++ b/src/app.h @@ -25,6 +25,7 @@ typedef struct App { int last_blackout_state; Uint32 startup_handoff_until; Uint32 channel_banner_until; + Uint32 channel_switch_lock_until; time_t app_start_time; Uint64 app_start_ticks; int guide_time_offset_minutes; diff --git a/src/app.o b/src/app.o index 8688f42..50a7b99 100644 Binary files a/src/app.o and b/src/app.o differ