mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
w32_common: mp_msg conversion
This commit is contained in:
parent
df5606afe0
commit
b789ef5e8e
@ -137,7 +137,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
|||||||
ClientToScreen(w32->window, &p);
|
ClientToScreen(w32->window, &p);
|
||||||
w32->window_x = p.x;
|
w32->window_x = p.x;
|
||||||
w32->window_y = p.y;
|
w32->window_y = p.y;
|
||||||
mp_msg(MSGT_VO, MSGL_V, "[vo] move window: %d:%d\n",
|
MP_VERBOSE(vo, "move window: %d:%d\n",
|
||||||
w32->window_x, w32->window_y);
|
w32->window_x, w32->window_y);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
|||||||
GetClientRect(w32->window, &r);
|
GetClientRect(w32->window, &r);
|
||||||
vo->dwidth = r.right;
|
vo->dwidth = r.right;
|
||||||
vo->dheight = r.bottom;
|
vo->dheight = r.bottom;
|
||||||
mp_msg(MSGT_VO, MSGL_V, "[vo] resize window: %d:%d\n",
|
MP_VERBOSE(vo, "resize window: %d:%d\n",
|
||||||
vo->dwidth, vo->dheight);
|
vo->dwidth, vo->dheight);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
|||||||
case SC_SCREENSAVE:
|
case SC_SCREENSAVE:
|
||||||
case SC_MONITORPOWER:
|
case SC_MONITORPOWER:
|
||||||
if (w32->disable_screensaver) {
|
if (w32->disable_screensaver) {
|
||||||
mp_msg(MSGT_VO, MSGL_V, "vo: win32: killing screensaver\n");
|
MP_VERBOSE(vo, "win32: killing screensaver\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -412,8 +412,7 @@ static void updateScreenProperties(struct vo *vo)
|
|||||||
dm.dmDriverExtra = 0;
|
dm.dmDriverExtra = 0;
|
||||||
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
|
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
|
||||||
if (!EnumDisplaySettings(0, ENUM_CURRENT_SETTINGS, &dm)) {
|
if (!EnumDisplaySettings(0, ENUM_CURRENT_SETTINGS, &dm)) {
|
||||||
mp_msg(MSGT_VO, MSGL_ERR,
|
MP_ERR(vo, "win32: unable to enumerate display settings!\n");
|
||||||
"vo: win32: unable to enumerate display settings!\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,7 +458,7 @@ static int reinit_window_state(struct vo *vo)
|
|||||||
w32->prev_height = vo->dheight;
|
w32->prev_height = vo->dheight;
|
||||||
w32->prev_x = w32->window_x;
|
w32->prev_x = w32->window_x;
|
||||||
w32->prev_y = w32->window_y;
|
w32->prev_y = w32->window_y;
|
||||||
mp_msg(MSGT_VO, MSGL_V, "[vo] save window bounds: %d:%d:%d:%d\n",
|
MP_VERBOSE(vo, "save window bounds: %d:%d:%d:%d\n",
|
||||||
w32->prev_x, w32->prev_y, w32->prev_width, w32->prev_height);
|
w32->prev_x, w32->prev_y, w32->prev_width, w32->prev_height);
|
||||||
}
|
}
|
||||||
vo->dwidth = vo->opts->screenwidth;
|
vo->dwidth = vo->opts->screenwidth;
|
||||||
@ -469,7 +468,7 @@ static int reinit_window_state(struct vo *vo)
|
|||||||
} else {
|
} else {
|
||||||
if (toggle_fs) {
|
if (toggle_fs) {
|
||||||
// Restore window position and size when switching from fullscreen.
|
// Restore window position and size when switching from fullscreen.
|
||||||
mp_msg(MSGT_VO, MSGL_V, "[vo] restore window bounds: %d:%d:%d:%d\n",
|
MP_VERBOSE(vo, "restore window bounds: %d:%d:%d:%d\n",
|
||||||
w32->prev_x, w32->prev_y, w32->prev_width, w32->prev_height);
|
w32->prev_x, w32->prev_y, w32->prev_width, w32->prev_height);
|
||||||
vo->dwidth = w32->prev_width;
|
vo->dwidth = w32->prev_width;
|
||||||
vo->dheight = w32->prev_height;
|
vo->dheight = w32->prev_height;
|
||||||
@ -486,7 +485,7 @@ static int reinit_window_state(struct vo *vo)
|
|||||||
SetWindowLong(w32->window, GWL_STYLE, style);
|
SetWindowLong(w32->window, GWL_STYLE, style);
|
||||||
add_window_borders(w32->window, &r);
|
add_window_borders(w32->window, &r);
|
||||||
|
|
||||||
mp_msg(MSGT_VO, MSGL_V, "[vo] reset window bounds: %d:%d:%d:%d\n",
|
MP_VERBOSE(vo, "reset window bounds: %d:%d:%d:%d\n",
|
||||||
(int) r.left, (int) r.top, (int)(r.right - r.left),
|
(int) r.left, (int) r.top, (int)(r.right - r.left),
|
||||||
(int)(r.bottom - r.top));
|
(int)(r.bottom - r.top));
|
||||||
|
|
||||||
@ -530,7 +529,7 @@ int vo_w32_config(struct vo *vo, uint32_t width, uint32_t height,
|
|||||||
pfd.iLayerType = PFD_MAIN_PLANE;
|
pfd.iLayerType = PFD_MAIN_PLANE;
|
||||||
pf = ChoosePixelFormat(vo_hdc, &pfd);
|
pf = ChoosePixelFormat(vo_hdc, &pfd);
|
||||||
if (!pf) {
|
if (!pf) {
|
||||||
mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to select a valid pixel format!\n");
|
MP_ERR(vo, "win32: unable to select a valid pixel format!\n");
|
||||||
ReleaseDC(w32->window, vo_hdc);
|
ReleaseDC(w32->window, vo_hdc);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -620,8 +619,7 @@ int vo_w32_init(struct vo *vo)
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!RegisterClassExW(&wcex)) {
|
if (!RegisterClassExW(&wcex)) {
|
||||||
mp_msg(MSGT_VO, MSGL_ERR,
|
MP_ERR(vo, "win32: unable to register window class!\n");
|
||||||
"vo: win32: unable to register window class!\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,7 +642,7 @@ int vo_w32_init(struct vo *vo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!w32->window) {
|
if (!w32->window) {
|
||||||
mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to create window!\n");
|
MP_ERR(vo, "win32: unable to create window!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,7 +662,7 @@ int vo_w32_init(struct vo *vo)
|
|||||||
|
|
||||||
updateScreenProperties(vo);
|
updateScreenProperties(vo);
|
||||||
|
|
||||||
mp_msg(MSGT_VO, MSGL_V, "vo: win32: running at %dx%d\n",
|
MP_VERBOSE(vo, "win32: running at %dx%d\n",
|
||||||
vo->opts->screenwidth, vo->opts->screenheight);
|
vo->opts->screenwidth, vo->opts->screenheight);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -773,7 +771,7 @@ int vo_w32_control(struct vo *vo, int *events, int request, void *arg)
|
|||||||
void vo_w32_uninit(struct vo *vo)
|
void vo_w32_uninit(struct vo *vo)
|
||||||
{
|
{
|
||||||
struct vo_w32_state *w32 = vo->w32;
|
struct vo_w32_state *w32 = vo->w32;
|
||||||
mp_msg(MSGT_VO, MSGL_V, "vo: win32: uninit\n");
|
MP_VERBOSE(vo, "win32: uninit\n");
|
||||||
if (!w32)
|
if (!w32)
|
||||||
return;
|
return;
|
||||||
SetThreadExecutionState(ES_CONTINUOUS);
|
SetThreadExecutionState(ES_CONTINUOUS);
|
||||||
|
Loading…
Reference in New Issue
Block a user