Skip to content

Commit

Permalink
kmsdrm: Fix wrong check on KMSDRM_CreateWindow.
Browse files Browse the repository at this point in the history
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: 3c501b9 ("Clang-Tidy fixes (libsdl-org#6725)").
  • Loading branch information
JohnnyonFlame authored Dec 23, 2022
1 parent 1a80fba commit 6eadad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/kmsdrm/SDL_kmsdrmvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,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. */
Expand Down

0 comments on commit 6eadad5

Please sign in to comment.