Fix channel state corruption when typing an non-existent channel
This commit is contained in:
parent
1034e31a44
commit
d501658b7e
2 changed files with 2 additions and 0 deletions
|
|
@ -153,6 +153,7 @@ static void tune_relative(App *app, int delta) {
|
||||||
player_tune(&app->player, next_index);
|
player_tune(&app->player, next_index);
|
||||||
fprintf(stderr, "[DEBUG tune_relative] after player_tune, current_index=%d\n", app->player.current_index);
|
fprintf(stderr, "[DEBUG tune_relative] after player_tune, current_index=%d\n", app->player.current_index);
|
||||||
app->channel_banner_until = SDL_GetTicks() + CHANNEL_BANNER_DURATION_MS;
|
app->channel_banner_until = SDL_GetTicks() + CHANNEL_BANNER_DURATION_MS;
|
||||||
|
app->numeric_input_invalid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int find_channel_by_number(const ChannelList *channels, int number) {
|
static int find_channel_by_number(const ChannelList *channels, int number) {
|
||||||
|
|
@ -184,6 +185,7 @@ static void tune_to_channel(App *app, int channel_index) {
|
||||||
player_tune(&app->player, channel_index);
|
player_tune(&app->player, channel_index);
|
||||||
fprintf(stderr, "[DEBUG tune_to_channel] after player_tune, current_index=%d\n", app->player.current_index);
|
fprintf(stderr, "[DEBUG tune_to_channel] after player_tune, current_index=%d\n", app->player.current_index);
|
||||||
app->channel_banner_until = SDL_GetTicks() + CHANNEL_BANNER_DURATION_MS;
|
app->channel_banner_until = SDL_GetTicks() + CHANNEL_BANNER_DURATION_MS;
|
||||||
|
app->numeric_input_invalid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void process_numeric_input(App *app) {
|
static void process_numeric_input(App *app) {
|
||||||
|
|
|
||||||
BIN
src/app.o
BIN
src/app.o
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue