diff options
author | Dudemanguy <random342@airmail.cc> | 2024-02-01 16:41:43 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-02-05 17:23:47 +0000 |
commit | 531868fe0d2a35fbbff78d9a9ff8f96df73e69fd (patch) | |
tree | 27917d2004335adcb17754829cc2870e2074f506 /options | |
parent | 7616190aa4c41c738c53d11d4ef37e70551c39cc (diff) | |
download | mpv-531868fe0d2a35fbbff78d9a9ff8f96df73e69fd.tar.bz2 mpv-531868fe0d2a35fbbff78d9a9ff8f96df73e69fd.tar.xz |
player: ensure runtime updates of certain rendering options
When adding things like brightness or gamma, the video obviously needs a
redraw if paused. This happened to work in the normal case because the
OSD notification triggered a redraw, but if you use no-osd the picture
won't change. Fix this by adding another option flag, UPDATE_VIDEO, and
simply signalling we want a redraw. This gets handled along with the
normal osd redrawing check in the playloop so something like "no-osd add
gamma 1" actually works.
Diffstat (limited to 'options')
-rw-r--r-- | options/m_option.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/options/m_option.h b/options/m_option.h index e62fa0fc26..d818a367b7 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -442,7 +442,8 @@ char *format_file_size(int64_t size); #define UPDATE_DVB_PROG (1 << 21) // some --dvbin-... #define UPDATE_SUB_HARD (1 << 22) // subtitle opts. that need full reinit #define UPDATE_SUB_EXTS (1 << 23) // update internal list of sub exts -#define UPDATE_OPT_LAST (1 << 23) +#define UPDATE_VIDEO (1 << 24) // force redraw if needed +#define UPDATE_OPT_LAST (1 << 24) // All bits between _FIRST and _LAST (inclusive) #define UPDATE_OPTS_MASK \ |