From 3c47f9b1b1781b5520ef1191a325937438643312 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 20 Sep 2023 19:12:49 +1000 Subject: [PATCH] Host: Report error on GPU device creation fail --- src/core/host.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/host.cpp b/src/core/host.cpp index 0a1fbebda..c7bd861c6 100644 --- a/src/core/host.cpp +++ b/src/core/host.cpp @@ -242,10 +242,15 @@ bool Host::CreateGPUDevice(RenderAPI api) SHADER_CACHE_VERSION, g_settings.gpu_use_debug_device, vsync, g_settings.gpu_threaded_presentation)) { - Log_ErrorPrintf("Failed to initialize GPU device."); + Log_ErrorPrintf("Failed to create GPU device."); if (g_gpu_device) g_gpu_device->Destroy(); 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; }