mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 06:30:36 +01:00
mesa: Add success/failures return value to _mesa_make_current.
This commit is contained in:
parent
a59575d8fb
commit
29c6c8eb18
2 changed files with 6 additions and 4 deletions
|
|
@ -1259,7 +1259,7 @@ initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
|
|||
* \param drawBuffer the drawing framebuffer
|
||||
* \param readBuffer the reading framebuffer
|
||||
*/
|
||||
void
|
||||
GLboolean
|
||||
_mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
|
||||
GLframebuffer *readBuffer )
|
||||
{
|
||||
|
|
@ -1272,14 +1272,14 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
|
|||
if (!check_compatible(newCtx, drawBuffer)) {
|
||||
_mesa_warning(newCtx,
|
||||
"MakeCurrent: incompatible visuals for context and drawbuffer");
|
||||
return;
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
if (newCtx && readBuffer && newCtx->WinSysReadBuffer != readBuffer) {
|
||||
if (!check_compatible(newCtx, readBuffer)) {
|
||||
_mesa_warning(newCtx,
|
||||
"MakeCurrent: incompatible visuals for context and readbuffer");
|
||||
return;
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1384,6 +1384,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
|
|||
newCtx->FirstTimeCurrent = GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ extern void
|
|||
_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
|
||||
|
||||
|
||||
extern void
|
||||
extern GLboolean
|
||||
_mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer,
|
||||
GLframebuffer *readBuffer );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue