mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-27 19:19:41 +08:00
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:
@@ -220,7 +220,7 @@ struct SDL_VideoDevice
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the native video subsystem, filling in the list of
|
* 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);
|
bool (*VideoInit)(SDL_VideoDevice *_this);
|
||||||
|
|
||||||
|
|||||||
@@ -843,13 +843,13 @@ SDL_DisplayID SDL_AddVideoDisplay(const SDL_VideoDisplay *display, bool send_eve
|
|||||||
|
|
||||||
new_display = (SDL_VideoDisplay *)SDL_malloc(sizeof(*new_display));
|
new_display = (SDL_VideoDisplay *)SDL_malloc(sizeof(*new_display));
|
||||||
if (!new_display) {
|
if (!new_display) {
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
displays = (SDL_VideoDisplay **)SDL_realloc(_this->displays, (_this->num_displays + 1) * sizeof(*displays));
|
displays = (SDL_VideoDisplay **)SDL_realloc(_this->displays, (_this->num_displays + 1) * sizeof(*displays));
|
||||||
if (!displays) {
|
if (!displays) {
|
||||||
SDL_free(new_display);
|
SDL_free(new_display);
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
_this->displays = displays;
|
_this->displays = displays;
|
||||||
_this->displays[_this->num_displays++] = new_display;
|
_this->displays[_this->num_displays++] = new_display;
|
||||||
|
|||||||
@@ -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
|
// 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.
|
// be called by SDL later, and we can manage it there.
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
bool KMSDRM_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props)
|
bool KMSDRM_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props)
|
||||||
|
|||||||
Reference in New Issue
Block a user