Add a return parameter to ImGui_Impl...._NewFrame()

Why does CreateDeviceObjects return a bool if the NewFrame doesn't ?
Added the return parameter cause CreateDeviceObjects can fail.
It did fail on DX11 with feature level to 9.
This commit is contained in:
Nemirtingas
2020-01-10 08:10:13 +01:00
parent 20c03cda75
commit 548f21c2f0
10 changed files with 26 additions and 16 deletions

View File

@ -556,8 +556,10 @@ void ImGui_ImplDX11_Shutdown()
if (g_pd3dDeviceContext) { g_pd3dDeviceContext->Release(); g_pd3dDeviceContext = NULL; }
}
void ImGui_ImplDX11_NewFrame()
bool ImGui_ImplDX11_NewFrame()
{
if (!g_pFontSampler)
ImGui_ImplDX11_CreateDeviceObjects();
return ImGui_ImplDX11_CreateDeviceObjects();
return true;
}