mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-30 19:37:12 -05:00
Bail out if only one renderer is present, but fails to initialize.
This commit is contained in:
parent
b2405e5221
commit
051164a091
1 changed files with 11 additions and 6 deletions
|
@ -1721,6 +1721,8 @@ namespace bgfx
|
|||
|
||||
RendererContextI* rendererCreate(RendererType::Enum _type)
|
||||
{
|
||||
RendererType::Enum last = RendererType::Count;
|
||||
|
||||
if (RendererType::Count == _type)
|
||||
{
|
||||
again:
|
||||
|
@ -1823,14 +1825,17 @@ again:
|
|||
}
|
||||
|
||||
RendererContextI* renderCtx = s_rendererCreator[_type].createFn();
|
||||
|
||||
if (last != _type)
|
||||
{
|
||||
if (NULL == renderCtx)
|
||||
{
|
||||
s_rendererCreator[_type].supported = false;
|
||||
last = _type;
|
||||
goto again;
|
||||
}
|
||||
|
||||
s_rendererDestroyFn = s_rendererCreator[_type].destroyFn;
|
||||
}
|
||||
|
||||
return renderCtx;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue