Skip to content

Commit

Permalink
vo_gpu_next: simplify pl_clear_mode enum mapping
Browse files Browse the repository at this point in the history
No reason for there to be two columns and this also fixes a
-Wenum-conversion warning on clang.
  • Loading branch information
Dudemanguy committed Feb 27, 2024
1 parent 3e42139 commit fa0fccc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions video/out/vo_gpu_next.c
Original file line number Diff line number Diff line change
Expand Up @@ -2104,13 +2104,13 @@ static void update_render_options(struct vo *vo)
pars->params.disable_fbos = opts->dumb_mode == 1;

#if PL_API_VER >= 346
enum pl_clear_mode map_background_types[3][2] = {
{ BACKGROUND_NONE, PL_CLEAR_SKIP },
{ BACKGROUND_COLOR, PL_CLEAR_COLOR },
{ BACKGROUND_TILES, PL_CLEAR_TILES },
int map_background_types[3] = {
PL_CLEAR_SKIP, // BACKGROUND_NONE
PL_CLEAR_COLOR, // BACKGROUND_COLOR
PL_CLEAR_TILES, // BACKGROUND_TILES
};
pars->params.background = map_background_types[opts->background][1];
pars->params.border = map_background_types[p->next_opts->border_background][1];
pars->params.background = map_background_types[opts->background];
pars->params.border = map_background_types[p->next_opts->border_background];
#else
pars->params.blend_against_tiles = opts->background == BACKGROUND_TILES;
#endif
Expand Down

0 comments on commit fa0fccc

Please sign in to comment.