From 9196abf1116f9d24e554e4027433b0201a78d90a Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 9 Jan 2023 16:14:20 +0100 Subject: DOCS: clarify wid casting on Windows The situation here is that HWND is always a 32-bit value but the win32 API also accepts sign-extended values as valid. The trouble starts when the numeric value is negative, as mpv ignores those. Apparently this only happens after a while (related to uptime or number of handles created), which meant this problem was rare. addresses #10189 --- DOCS/man/options.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index b5bfd6e4e9..3b2e2d1bf5 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3317,8 +3317,9 @@ Window draw directly on the root window. On win32, the ID is interpreted as ``HWND``. Pass it as value cast to - ``intptr_t``. mpv will create its own window, and set the wid window as - parent, like with X11. + ``uint32_t`` (all Windows handles are 32-bit), this is important as mpv will + not accept negative values. mpv will create its own window and set the + wid window as parent, like with X11. On macOS/Cocoa, the ID is interpreted as ``NSView*``. Pass it as value cast to ``intptr_t``. mpv will create its own sub-view. Because macOS does not -- cgit v1.2.3