mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
GL: check QOpenGlContext::create result
This commit is contained in:
parent
f7d8993a1f
commit
2a0fa53c0d
1 changed files with 9 additions and 2 deletions
|
@ -52,7 +52,11 @@ draw_context_t gl_gs_frame::make_context()
|
||||||
}
|
}
|
||||||
|
|
||||||
context->handle->setFormat(m_format);
|
context->handle->setFormat(m_format);
|
||||||
context->handle->create();
|
|
||||||
|
if (!context->handle->create())
|
||||||
|
{
|
||||||
|
fmt::throw_exception("Failed to create OpenGL context");
|
||||||
|
}
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +78,10 @@ void gl_gs_frame::set_current(draw_context_t ctx)
|
||||||
}
|
}
|
||||||
else if (!context->handle->isValid())
|
else if (!context->handle->isValid())
|
||||||
{
|
{
|
||||||
context->handle->create();
|
if (!context->handle->create())
|
||||||
|
{
|
||||||
|
fmt::throw_exception("Failed to create OpenGL context");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!context->handle->makeCurrent(context->surface))
|
if (!context->handle->makeCurrent(context->surface))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue