[KMS/DRM] Correct comments about last bugfix.

This commit is contained in:
Manuel Alfayate Corchete 2020-12-31 01:40:15 +01:00
parent e34caa9779
commit e1fb969b76
1 changed files with 8 additions and 5 deletions

View File

@ -1781,14 +1781,17 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window)
int ret = 0; int ret = 0;
if ( !(dispdata->gbm_init) && !is_vulkan && !vulkan_mode ) { if ( !(dispdata->gbm_init) && !is_vulkan && !vulkan_mode ) {
/* Maybe you didn't ask for an OPENGL window, but that's what you will get. /* If this is not a Vulkan Window, then this is a GL window, so at the
At the end of this function, we must have marked the window as being OPENGL end of this function, we must have marked the window as being OPENGL
and we must have loaded the GL library: both things are needed so the and we must have loaded the GL library: both things are needed so the
GL_CreateRenderer() and GL_LoadFunctions() calls in SDL_CreateWindow() GL_CreateRenderer() and GL_LoadFunctions() calls in SDL_CreateWindow()
succeed without having to re-create the window. succeed without having to re-create the window.
We must load the EGL library too, which can't be loaded until the GBM device We must load the EGL library too, which can't be loaded until the GBM
has been created, because SDL_EGL_Library() function uses it. */ device has been created, because SDL_EGL_Library() function uses it. */
/* Maybe you didn't ask for an OPENGL window, but that's what you will get.
See previous comment on why. */
window->flags |= SDL_WINDOW_OPENGL; window->flags |= SDL_WINDOW_OPENGL;
/* Reopen FD, create gbm dev, setup display plane, etc,. /* Reopen FD, create gbm dev, setup display plane, etc,.