System: Make hardware renderer init failure an OSD message

This commit is contained in:
Connor McLaughlin 2021-03-05 01:05:13 +10:00
parent ccda1553b7
commit 521ade025c
1 changed files with 7 additions and 1 deletions

View File

@ -1010,7 +1010,13 @@ bool CreateGPU(GPURenderer renderer)
if (!g_gpu || !g_gpu->Initialize(g_host_interface->GetDisplay()))
{
Log_ErrorPrintf("Failed to initialize GPU, falling back to software");
Log_ErrorPrintf("Failed to initialize %s renderer, falling back to software renderer",
Settings::GetRendererName(renderer));
g_host_interface->AddFormattedOSDMessage(
30.0f,
g_host_interface->TranslateString("OSDMessage",
"Failed to initialize %s renderer, falling back to software renderer."),
Settings::GetRendererName(renderer));
g_gpu.reset();
g_gpu = GPU::CreateSoftwareRenderer();
if (!g_gpu->Initialize(g_host_interface->GetDisplay()))