Some small fixes and corrections: comment typos, a wrong return value.

Just a few things I stumbled upon this week.
This commit is contained in:
Ryan C. Gordon
2025-06-29 03:07:51 -04:00
parent 34928341d0
commit 4217d62fa2
3 changed files with 4 additions and 4 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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)