mirror of https://github.com/mpv-player/mpv
gl_32: mp_msg conversion
This commit is contained in:
parent
b789ef5e8e
commit
a84fd1c44a
|
@ -55,12 +55,12 @@ static bool create_context_w32_old(struct MPGLContext *ctx)
|
||||||
|
|
||||||
HGLRC new_context = wglCreateContext(windc);
|
HGLRC new_context = wglCreateContext(windc);
|
||||||
if (!new_context) {
|
if (!new_context) {
|
||||||
mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Could not create GL context!\n");
|
MP_FATAL(ctx->vo, "Could not create GL context!\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wglMakeCurrent(windc, new_context)) {
|
if (!wglMakeCurrent(windc, new_context)) {
|
||||||
mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Could not set GL context!\n");
|
MP_FATAL(ctx->vo, "Could not set GL context!\n");
|
||||||
wglDeleteContext(new_context);
|
wglDeleteContext(new_context);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -89,13 +89,13 @@ static bool create_context_w32_gl3(struct MPGLContext *ctx)
|
||||||
|
|
||||||
new_context = wglCreateContext(windc);
|
new_context = wglCreateContext(windc);
|
||||||
if (!new_context) {
|
if (!new_context) {
|
||||||
mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Could not create GL context!\n");
|
MP_FATAL(ctx->vo, "Could not create GL context!\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set context
|
// set context
|
||||||
if (!wglMakeCurrent(windc, new_context)) {
|
if (!wglMakeCurrent(windc, new_context)) {
|
||||||
mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Could not set GL context!\n");
|
MP_FATAL(ctx->vo, "Could not set GL context!\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,8 +135,7 @@ static bool create_context_w32_gl3(struct MPGLContext *ctx)
|
||||||
}
|
}
|
||||||
if (! *context) {
|
if (! *context) {
|
||||||
int err = GetLastError();
|
int err = GetLastError();
|
||||||
mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Could not create an OpenGL 3.x"
|
MP_FATAL(ctx->vo, "Could not create an OpenGL 3.x context: error 0x%x\n", err);
|
||||||
" context: error 0x%x\n", err);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +143,7 @@ static bool create_context_w32_gl3(struct MPGLContext *ctx)
|
||||||
wglDeleteContext(new_context);
|
wglDeleteContext(new_context);
|
||||||
|
|
||||||
if (!wglMakeCurrent(windc, *context)) {
|
if (!wglMakeCurrent(windc, *context)) {
|
||||||
mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Could not set GL3 context!\n");
|
MP_FATAL(ctx->vo, "Could not set GL3 context!\n");
|
||||||
wglDeleteContext(*context);
|
wglDeleteContext(*context);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -163,8 +162,7 @@ static bool create_context_w32_gl3(struct MPGLContext *ctx)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
unsupported:
|
unsupported:
|
||||||
mp_msg(MSGT_VO, MSGL_ERR, "[gl] The current OpenGL implementation does"
|
MP_ERR(ctx->vo, "The current OpenGL implementation does not support OpenGL 3.x \n");
|
||||||
" not support OpenGL 3.x \n");
|
|
||||||
out:
|
out:
|
||||||
wglDeleteContext(new_context);
|
wglDeleteContext(new_context);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue