diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index 9f02c6d1c5..42ade5e7d7 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 6033168843..44a0463f4b 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 257b35d323..d918b31096 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)