mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 07:35:41 +00:00
GPU/OpenGL: Don't recreate context on sw switch when using GLES
This commit is contained in:
parent
106addf5a8
commit
8f39ad3555
|
@ -43,7 +43,10 @@ GPURenderer GPU_HW_OpenGL::GetRendererType() const
|
|||
|
||||
bool GPU_HW_OpenGL::Initialize()
|
||||
{
|
||||
if (!Host::AcquireHostDisplay(RenderAPI::OpenGL))
|
||||
// Don't re-request GL when we already have GLES here...
|
||||
const RenderAPI current_api = g_host_display ? g_host_display->GetRenderAPI() : RenderAPI::None;
|
||||
if (current_api != RenderAPI::OpenGL && current_api != RenderAPI::OpenGLES &&
|
||||
!Host::AcquireHostDisplay(RenderAPI::OpenGL))
|
||||
{
|
||||
Log_ErrorPrintf("Host render API type is incompatible");
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue