1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 10:02:17 +00:00

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
This commit is contained in:
sfan5 2023-01-09 16:14:20 +01:00
parent a5b9d529ee
commit 9196abf111

View File

@ -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