Skip to content

Commit

Permalink
[KMSDRM] Undo SDL_CreateRenderer() modifications aimed at create open…
Browse files Browse the repository at this point in the history
…gles2 when KMSDRM is in use because it's a harmful solution.
  • Loading branch information
vanfanel authored and slouken committed Mar 16, 2021
1 parent 7a2a1a8 commit e14fb54
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/render/SDL_render.c
Expand Up @@ -838,28 +838,6 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)
}
}

#if SDL_VIDEO_DRIVER_KMSDRM

/* Even if full OpenGL works with the KMSDRM backend, GLES2 renderer is still preferred. */
if ((SDL_strcmp(SDL_GetCurrentVideoDriver(), "KMSDRM") == 0) && (!renderer)) {

for (index = 0; index < n; ++index) {

const SDL_RenderDriver *driver = render_drivers[index];

if ((SDL_strcmp(driver->info.name, "opengles2") == 0) && (!renderer)) {
/* Create a new renderer instance */
renderer = driver->CreateRenderer(window, flags);
if (renderer) {
/* Got an OpenGL_ES2 renderer as expected for KMSDRM by default. */
break;
}
}
}
}

#endif

if (!renderer) {
for (index = 0; index < n; ++index) {
const SDL_RenderDriver *driver = render_drivers[index];
Expand Down

0 comments on commit e14fb54

Please sign in to comment.