summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-06 20:00:26 +0200
committerwm4 <wm4@nowhere>2014-08-06 20:30:47 +0200
commit77ad49411af12f023e37a96bf0a3111791c67f2c (patch)
tree0f107261a8e2c077f40e6c80aa730772348cc58f /stream
parent64e1132d39c7124d1f7376e49a311d34a636cb26 (diff)
downloadmpv-77ad49411af12f023e37a96bf0a3111791c67f2c.tar.bz2
mpv-77ad49411af12f023e37a96bf0a3111791c67f2c.tar.xz
win32: never call GetClientRect(0, ...)
Sometimes GetClientRect() appeared to fail during init, and since we don't check GetClientRect() calls (because they're on our own window, and logically can never fail), bogus resizes were triggered. This could cause vo_direct3d to fail initialization. The reason was that w32->window was set to 0 during early window initialization: CreateWindow*() can send messages to the new window, even though it hasn't returned yet. This means w32->window is not yet set to our window handle, and functions in WndProc may accidentally pass hwnd=0 to win32 API functions. Fix it by initializing w32->window on opportunity. This also means we always strictly expect that the WndProc is used with our own window only.
Diffstat (limited to 'stream')
0 files changed, 0 insertions, 0 deletions