From a88fdfde0c91c16c84e6057b19bdc2fb9e666e24 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 12 Apr 2021 12:51:41 -0500 Subject: command: add display-width/display-height property For some reason, this never existed before. Add VOCTRL_GET_DISPLAY_RES and use it to obtain the current display's resolution from each vo/windowing backend if applicable. Users can then access the current display resolution as display-width and display-height as per the client api. Note that macOS/cocoa was not attempted in this commit since the author has no clue how to write swift. --- DOCS/man/input.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 6d396e12e2..8c17468a78 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2534,6 +2534,11 @@ Property list ``vsync-jitter`` Estimated deviation factor of the vsync duration. +``display-width``, ``display-height`` + The current display's horizontal and vertical resolution in pixels. Whether + or not these values update as the mpv window changes displays depends on + the windowing backend. It may not be available on all platforms. + ``display-hidpi-scale`` The HiDPI scale factor as reported by the windowing backend. If no VO is active, or if the VO does not report a value, this property is unavailable. -- cgit v1.2.3