From 4217d62fa20195959489afec32ed2d9d8753c96e Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Sun, 29 Jun 2025 03:07:51 -0400
Subject: [PATCH] Some small fixes and corrections: comment typos, a wrong
return value.
Just a few things I stumbled upon this week.
---
src/video/SDL_sysvideo.h | 2 +-
src/video/SDL_video.c | 4 ++--
src/video/kmsdrm/SDL_kmsdrmvideo.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index 9f02c6d1c5235..42ade5e7d7639 100644
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -220,7 +220,7 @@ struct SDL_VideoDevice
/*
* Initialize the native video subsystem, filling in the list of
- * displays for this driver, returning 0 or -1 if there's an error.
+ * displays for this driver, returning true (success) or false (error).
*/
bool (*VideoInit)(SDL_VideoDevice *_this);
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 6033168843302..44a0463f4bb2f 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -843,13 +843,13 @@ SDL_DisplayID SDL_AddVideoDisplay(const SDL_VideoDisplay *display, bool send_eve
new_display = (SDL_VideoDisplay *)SDL_malloc(sizeof(*new_display));
if (!new_display) {
- return true;
+ return 0;
}
displays = (SDL_VideoDisplay **)SDL_realloc(_this->displays, (_this->num_displays + 1) * sizeof(*displays));
if (!displays) {
SDL_free(new_display);
- return true;
+ return 0;
}
_this->displays = displays;
_this->displays[_this->num_displays++] = new_display;
diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index 257b35d323328..d918b31096a02 100644
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
@@ -1543,7 +1543,7 @@ void KMSDRM_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window)
/**********************************************************************/
// We simply IGNORE if it's a fullscreen window, window->flags don't
-// reflect it: if it's fullscreen, KMSDRM_SetWindwoFullscreen() will
+// reflect it: if it's fullscreen, KMSDRM_SetWindowFullscreen() will
// be called by SDL later, and we can manage it there.
/**********************************************************************/
bool KMSDRM_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props)