mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 15:15:40 +00:00
Host: Report error on GPU device creation fail
This commit is contained in:
parent
18ae01bedb
commit
3c47f9b1b1
|
@ -242,10 +242,15 @@ bool Host::CreateGPUDevice(RenderAPI api)
|
||||||
SHADER_CACHE_VERSION, g_settings.gpu_use_debug_device, vsync,
|
SHADER_CACHE_VERSION, g_settings.gpu_use_debug_device, vsync,
|
||||||
g_settings.gpu_threaded_presentation))
|
g_settings.gpu_threaded_presentation))
|
||||||
{
|
{
|
||||||
Log_ErrorPrintf("Failed to initialize GPU device.");
|
Log_ErrorPrintf("Failed to create GPU device.");
|
||||||
if (g_gpu_device)
|
if (g_gpu_device)
|
||||||
g_gpu_device->Destroy();
|
g_gpu_device->Destroy();
|
||||||
g_gpu_device.reset();
|
g_gpu_device.reset();
|
||||||
|
|
||||||
|
Host::ReportErrorAsync("Error",
|
||||||
|
fmt::format("Failed to create render device. This may be due to your GPU not supporting the "
|
||||||
|
"chosen renderer ({}), or because your graphics drivers need to be updated.",
|
||||||
|
GPUDevice::RenderAPIToString(api)));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue