1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-04 21:27:58 +00:00

Fix message handling, process resize events

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17116 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2005-12-06 22:15:03 +00:00
parent d1d5696ee1
commit 33d32ef193

View File

@ -21,9 +21,18 @@ uint32_t o_dheight;
static HINSTANCE hInstance;
HWND vo_window = 0;
static int cursor = 1;
static int event_flags;
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) {
case WM_ACTIVATE:
event_flags |= VO_EVENT_EXPOSE;
break;
case WM_SIZE:
event_flags |= VO_EVENT_RESIZE;
vo_dwidth = lParam & 0xffff;
vo_dheight = lParam >> 16;
break;
case WM_CLOSE:
mplayer_put_key(KEY_CLOSE_WIN);
break;
@ -90,18 +99,13 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
int vo_w32_check_events(void) {
MSG msg;
int r = 0;
event_flags = 0;
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
switch (msg.message) {
case WM_ACTIVATE:
r |= VO_EVENT_EXPOSE;
break;
}
}
return r;
return event_flags;
}
static void updateScreenProperties() {