1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00

w32_common: mp_msg conversion

This commit is contained in:
Alexander Preisinger 2013-09-11 21:32:36 +02:00
parent df5606afe0
commit b789ef5e8e

View File

@ -137,7 +137,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
ClientToScreen(w32->window, &p);
w32->window_x = p.x;
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);
break;
}
@ -147,7 +147,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
GetClientRect(w32->window, &r);
vo->dwidth = r.right;
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);
break;
}
@ -181,7 +181,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
case SC_SCREENSAVE:
case SC_MONITORPOWER:
if (w32->disable_screensaver) {
mp_msg(MSGT_VO, MSGL_V, "vo: win32: killing screensaver\n");
MP_VERBOSE(vo, "win32: killing screensaver\n");
return 0;
}
break;
@ -412,8 +412,7 @@ static void updateScreenProperties(struct vo *vo)
dm.dmDriverExtra = 0;
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
if (!EnumDisplaySettings(0, ENUM_CURRENT_SETTINGS, &dm)) {
mp_msg(MSGT_VO, MSGL_ERR,
"vo: win32: unable to enumerate display settings!\n");
MP_ERR(vo, "win32: unable to enumerate display settings!\n");
return;
}
@ -459,7 +458,7 @@ static int reinit_window_state(struct vo *vo)
w32->prev_height = vo->dheight;
w32->prev_x = w32->window_x;
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);
}
vo->dwidth = vo->opts->screenwidth;
@ -469,7 +468,7 @@ static int reinit_window_state(struct vo *vo)
} else {
if (toggle_fs) {
// 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);
vo->dwidth = w32->prev_width;
vo->dheight = w32->prev_height;
@ -486,7 +485,7 @@ static int reinit_window_state(struct vo *vo)
SetWindowLong(w32->window, GWL_STYLE, style);
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.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;
pf = ChoosePixelFormat(vo_hdc, &pfd);
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);
return 0;
}
@ -620,8 +619,7 @@ int vo_w32_init(struct vo *vo)
};
if (!RegisterClassExW(&wcex)) {
mp_msg(MSGT_VO, MSGL_ERR,
"vo: win32: unable to register window class!\n");
MP_ERR(vo, "win32: unable to register window class!\n");
return 0;
}
@ -644,7 +642,7 @@ int vo_w32_init(struct vo *vo)
}
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;
}
@ -664,7 +662,7 @@ int vo_w32_init(struct vo *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);
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)
{
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)
return;
SetThreadExecutionState(ES_CONTINUOUS);