mirror of https://github.com/mpv-player/mpv
6c56a413ab
Window classes are global per process, but they are associated with the module that registered them. Documentation is clear that it is the DLL's responsibility to unregister its own classes: No window classes registered by a DLL are unregistered when the DLL is unloaded. A DLL must explicitly unregister its classes when it is unloaded. See: https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-registerclassw Using a window class after the DLL is unloaded would result in access violation errors. This is not that important for libmpv, where it is unlikely someone would use the "mpv" window class externally. The real issue comes from the fact that reloading libmpv would fail to register the class (as it still exists) and consequently fail to create a window. This commit fixes the operability of libmpv after reloading it. Fixes: #11638 |
||
---|---|---|
.. | ||
d3d11 | ||
gpu | ||
gpu_next | ||
hwdec | ||
mac | ||
opengl | ||
placebo | ||
vulkan | ||
win32 | ||
wldmabuf | ||
android_common.c | ||
android_common.h | ||
aspect.c | ||
aspect.h | ||
bitmap_packer.c | ||
bitmap_packer.h | ||
cocoa_cb_common.swift | ||
dither.c | ||
dither.h | ||
dr_helper.c | ||
dr_helper.h | ||
drm_atomic.c | ||
drm_atomic.h | ||
drm_common.c | ||
drm_common.h | ||
drm_prime.c | ||
drm_prime.h | ||
filter_kernels.c | ||
filter_kernels.h | ||
libmpv.h | ||
libmpv_sw.c | ||
mac_common.swift | ||
meson.build | ||
present_sync.c | ||
present_sync.h | ||
vo.c | ||
vo.h | ||
vo_caca.c | ||
vo_direct3d.c | ||
vo_dmabuf_wayland.c | ||
vo_drm.c | ||
vo_gpu.c | ||
vo_gpu_next.c | ||
vo_image.c | ||
vo_kitty.c | ||
vo_lavc.c | ||
vo_libmpv.c | ||
vo_mediacodec_embed.c | ||
vo_null.c | ||
vo_sdl.c | ||
vo_sixel.c | ||
vo_tct.c | ||
vo_vaapi.c | ||
vo_vdpau.c | ||
vo_wlshm.c | ||
vo_x11.c | ||
vo_xv.c | ||
w32_common.c | ||
w32_common.h | ||
wayland_common.c | ||
wayland_common.h | ||
win_state.c | ||
win_state.h | ||
x11_common.c | ||
x11_common.h |