kmsdrm: Fix wrong check on KMSDRM_CreateWindow.

A previous cleanup commit inverted a statement that checked the return value of
a KMSDRM_CreateSurfaces call during KMSDRM_CreateWindow, which causes the video
backend to always fail despite success.

This commit restores the intended behavior.

Fixes: 3c501b963d ("Clang-Tidy fixes (#6725)").
(cherry picked from commit 0187209f46)
This commit is contained in:
João Henrique 2022-12-23 09:52:45 -03:00 committed by Sam Lantinga
parent 232ed540db
commit af54c82138

View file

@ -1492,7 +1492,7 @@ int KMSDRM_CreateWindow(_THIS, SDL_Window *window)
/* Create the window surfaces with the size we have just chosen.
Needs the window diverdata in place. */
ret = KMSDRM_CreateSurfaces(_this, window);
if (ret == 0) {
if (ret != 0) {
return SDL_SetError("Can't window GBM/EGL surfaces on window creation.");
}
} /* NON-Vulkan block ends. */