mp_msg_levels[] will go away.
Showing the changes to options/parse_commandline.c (1 of 3 files). Show all
Unified · Split
| @@ -265,8 +265,6 @@ err_out: · 264 unmodified lines | ||
| 265 | 265 | return ret; |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | −extern int mp_msg_levels[]; | |
| 269 | − | |
| 270 | 268 | /* Parse some command line options early before main parsing. |
| 271 | 269 | * --no-config prevents reading configuration files (otherwise done before |
| 272 | 270 | * command line parsing), and --really-quiet suppresses messages printed |
| @@ -275,8 +273,7 @@ extern int mp_msg_levels[]; · 2 unmodified lines | ||
| 275 | 273 | void m_config_preparse_command_line(m_config_t *config, int argc, char **argv) |
| 276 | 274 | { |
| 277 | 275 | // Hack to shut up parser error messages |
| 278 | − int msg_lvl_backup = mp_msg_levels[MSGT_CFGPARSER]; | |
| 279 | − mp_msg_levels[MSGT_CFGPARSER] = -11; | |
| 276 | + mp_msg_mute = true; | |
| 280 | 277 | |
| 281 | 278 | struct parse_state p = {config, argc, argv}; |
| 282 | 279 | while (split_opt_silent(&p) == 0) { |
| @@ -290,5 +287,5 @@ void m_config_preparse_command_line(m_config_t *config, int argc, char **argv) · 7 unmodified lines | ||
| 290 | 287 | } |
| 291 | 288 | } |
| 292 | 289 | |
| 293 | − mp_msg_levels[MSGT_CFGPARSER] = msg_lvl_backup; | |
| 290 | + mp_msg_mute = false; | |
| 294 | 291 | } |