summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/input.rst2
-rw-r--r--player/command.c16
2 files changed, 10 insertions, 8 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 04cf44c8ae..108c7a0de2 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -1452,7 +1452,7 @@ Property list
Names of the displays that the mpv window covers. On X11, these
are the xrandr names (LVDS1, HDMI1, DP1, VGA1, etc.).
-``display-fps``
+``display-fps`` (RW)
The refresh rate of the current display. Currently, this is the lowest FPS
of any display covered by the video, as retrieved by the underlying system
APIs (e.g. xrandr on X11). It is not the measured FPS. It's not necessarily
diff --git a/player/command.c b/player/command.c
index 27912354a5..6473de4af9 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2574,14 +2574,16 @@ static int mp_property_display_fps(void *ctx, struct m_property *prop,
int action, void *arg)
{
MPContext *mpctx = ctx;
+ double fps = mpctx->opts->frame_drop_fps;
struct vo *vo = mpctx->video_out;
- if (!vo)
- return M_PROPERTY_UNAVAILABLE;
-
- double fps = vo_get_display_fps(vo);
- if (fps < 1)
- return M_PROPERTY_UNAVAILABLE;
-
+ if (vo)
+ fps = vo_get_display_fps(vo);
+ if (action == M_PROPERTY_SET) {
+ int ret = mp_property_generic_option(mpctx, prop, action, arg);
+ if (vo)
+ vo_event(vo, VO_EVENT_WIN_STATE);
+ return ret;
+ }
return m_property_double_ro(action, arg, fps);
}