diff options
Diffstat (limited to 'drivers/gles3/storage/utilities.cpp')
-rw-r--r-- | drivers/gles3/storage/utilities.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gles3/storage/utilities.cpp b/drivers/gles3/storage/utilities.cpp index 30c3e61ee7..5f21d8f70a 100644 --- a/drivers/gles3/storage/utilities.cpp +++ b/drivers/gles3/storage/utilities.cpp @@ -328,11 +328,15 @@ uint64_t Utilities::get_rendering_info(RS::RenderingInfo p_info) { } String Utilities::get_video_adapter_name() const { - return (const char *)glGetString(GL_RENDERER); + const String rendering_device_name = (const char *)glGetString(GL_RENDERER); + // NVIDIA suffixes all GPU model names with "/PCIe/SSE2" in OpenGL (but not Vulkan). This isn't necessary to display nowadays, so it can be trimmed. + return rendering_device_name.trim_suffix("/PCIe/SSE2"); } String Utilities::get_video_adapter_vendor() const { - return (const char *)glGetString(GL_VENDOR); + const String rendering_device_vendor = (const char *)glGetString(GL_VENDOR); + // NVIDIA suffixes its vendor name with " Corporation". This is neither necessary to process nor display. + return rendering_device_vendor.trim_suffix(" Corporation"); } RenderingDevice::DeviceType Utilities::get_video_adapter_type() const { |