Commit a2abb3b6 authored by Holmes Futrell's avatar Holmes Futrell

Ran GNU indent on file

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403197
parent fcc9f445
......@@ -184,12 +184,10 @@ SDL_VideoInit(const char *driver_name, Uint32 flags)
if (SDL_StartEventLoop(flags) < 0) {
return -1;
}
/* Check to make sure we don't overwrite '_this' */
if (_this != NULL) {
SDL_VideoQuit();
}
/* Select the proper video driver */
index = 0;
video = NULL;
......@@ -253,14 +251,12 @@ SDL_VideoInit(const char *driver_name, Uint32 flags)
SDL_VideoQuit();
return -1;
}
/* Make sure some displays were added */
if (_this->num_displays == 0) {
SDL_SetError("The video driver did not add any displays");
SDL_VideoQuit();
return (-1);
}
/* The software renderer is always available */
for (i = 0; i < _this->num_displays; ++i) {
#if SDL_VIDEO_RENDER_OGL
......@@ -461,7 +457,6 @@ SDL_GetClosestDisplayMode(const SDL_DisplayMode * mode,
if (!_this || !mode || !closest) {
return NULL;
}
/* Default to the desktop format */
if (mode->format) {
target_format = mode->format;
......@@ -527,7 +522,10 @@ SDL_GetClosestDisplayMode(const SDL_DisplayMode * mode,
}
closest->driverdata = match->driverdata;
/* Pick some reasonable defaults if the app and driver don't care */
/*
* Pick some reasonable defaults if the app and driver don't
* care
*/
if (!closest->format) {
closest->format = SDL_PIXELFORMAT_RGB888;
}
......@@ -554,7 +552,6 @@ SDL_SetDisplayMode(const SDL_DisplayMode * mode)
SDL_UninitializedVideo();
return -1;
}
display = &SDL_CurrentDisplay;
if (!mode) {
mode = &display->desktop_mode;
......@@ -574,20 +571,17 @@ SDL_SetDisplayMode(const SDL_DisplayMode * mode)
if (!display_mode.refresh_rate) {
display_mode.refresh_rate = display->current_mode.refresh_rate;
}
/* Get a good video mode, the closest one possible */
if (!SDL_GetClosestDisplayMode(&display_mode, &display_mode)) {
SDL_SetError("No video mode large enough for %dx%d",
display_mode.w, display_mode.h);
return -1;
}
/* See if there's anything left to do */
SDL_GetCurrentDisplayMode(&current_mode);
if (SDL_memcmp(&display_mode, &current_mode, sizeof(display_mode)) == 0) {
return 0;
}
/* Actually change the display mode */
if (_this->SetDisplayMode(_this, &display_mode) < 0) {
return -1;
......@@ -615,7 +609,6 @@ SDL_SetDisplayMode(const SDL_DisplayMode * mode)
SDL_BITSPERPIXEL(display_mode.format));
}
}
/* Move any fullscreen windows into position */
for (i = 0; i < display->num_windows; ++i) {
SDL_Window *window = &display->windows[i];
......@@ -639,12 +632,10 @@ SDL_SetFullscreenDisplayMode(const SDL_DisplayMode * mode)
SDL_UninitializedVideo();
return -1;
}
display = &SDL_CurrentDisplay;
if (!mode) {
mode = &display->desktop_mode;
}
SDL_GetClosestDisplayMode(mode, &fullscreen_mode);
if (SDL_memcmp
(&fullscreen_mode, &display->fullscreen_mode,
......@@ -697,7 +688,6 @@ SDL_SetDisplayPalette(const SDL_Color * colors, int firstcolor, int ncolors)
SDL_SetError("Display mode does not have a palette");
return -1;
}
status = SDL_SetPaletteColors(palette, colors, firstcolor, ncolors);
if (_this->SetDisplayPalette) {
......@@ -717,18 +707,15 @@ SDL_GetDisplayPalette(SDL_Color * colors, int firstcolor, int ncolors)
SDL_UninitializedVideo();
return -1;
}
palette = SDL_CurrentDisplay.palette;
if (!palette->ncolors) {
SDL_SetError("Display mode does not have a palette");
return -1;
}
if (firstcolor < 0 || (firstcolor + ncolors) > palette->ncolors) {
SDL_SetError("Palette indices are out of range");
return -1;
}
SDL_memcpy(colors, &palette->colors[firstcolor],
ncolors * sizeof(*colors));
return 0;
......@@ -750,18 +737,15 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
SDL_UninitializedVideo();
return 0;
}
if ((flags & SDL_WINDOW_OPENGL) && !_this->GL_CreateContext) {
SDL_SetError("No OpenGL support in video driver");
return 0;
}
/* Fullscreen windows don't have any window decorations */
if (flags & SDL_WINDOW_FULLSCREEN) {
flags |= SDL_WINDOW_BORDERLESS;
flags &= ~SDL_WINDOW_RESIZABLE;
}
SDL_zero(window);
window.id = _this->next_object_id++;
window.x = x;
......@@ -774,7 +758,6 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
if (_this->CreateWindow && _this->CreateWindow(_this, &window) < 0) {
return 0;
}
display = &SDL_CurrentDisplay;
num_windows = display->num_windows;
windows =
......@@ -819,7 +802,6 @@ SDL_CreateWindowFrom(const void *data)
SDL_UninitializedVideo();
return (0);
}
SDL_zero(window);
window.id = _this->next_object_id++;
window.display = _this->current_display;
......@@ -828,7 +810,6 @@ SDL_CreateWindowFrom(const void *data)
_this->CreateWindowFrom(_this, &window, data) < 0) {
return 0;
}
display = &SDL_CurrentDisplay;
num_windows = display->num_windows;
windows =
......@@ -858,11 +839,9 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
SDL_SetError("No OpenGL support in video driver");
return -1;
}
if (_this->DestroyWindow) {
_this->DestroyWindow(_this, window);
}
window->title = NULL;
window->flags =
(flags &
......@@ -872,7 +851,6 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
if (_this->CreateWindow && _this->CreateWindow(_this, window) < 0) {
return -1;
}
if (title) {
SDL_SetWindowTitle(window->id, title);
SDL_free(title);
......@@ -901,7 +879,6 @@ SDL_GetWindowFromID(SDL_WindowID windowID)
SDL_UninitializedVideo();
return NULL;
}
for (i = 0; i < _this->num_displays; ++i) {
SDL_VideoDisplay *display = &_this->displays[i];
for (j = 0; j < display->num_windows; ++j) {
......@@ -946,7 +923,6 @@ SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
if (!window || title == window->title) {
return;
}
if (window->title) {
SDL_free(window->title);
}
......@@ -1003,7 +979,6 @@ SDL_SetWindowPosition(SDL_WindowID windowID, int x, int y)
if (!window) {
return;
}
if (x == SDL_WINDOWPOS_CENTERED) {
window->x = (display->current_mode.w - window->w) / 2;
} else if (x != SDL_WINDOWPOS_UNDEFINED) {
......@@ -1014,7 +989,6 @@ SDL_SetWindowPosition(SDL_WindowID windowID, int x, int y)
} else if (y != SDL_WINDOWPOS_UNDEFINED) {
window->y = y;
}
if (_this->SetWindowPosition) {
_this->SetWindowPosition(_this, window);
}
......@@ -1044,7 +1018,6 @@ SDL_SetWindowSize(SDL_WindowID windowID, int w, int h)
if (!window) {
return;
}
window->w = w;
window->h = h;
......@@ -1077,7 +1050,6 @@ SDL_ShowWindow(SDL_WindowID windowID)
if (!window || (window->flags & SDL_WINDOW_SHOWN)) {
return;
}
SDL_SendWindowEvent(window->id, SDL_WINDOWEVENT_SHOWN, 0, 0);
if (_this->ShowWindow) {
......@@ -1093,7 +1065,6 @@ SDL_HideWindow(SDL_WindowID windowID)
if (!window || !(window->flags & SDL_WINDOW_SHOWN)) {
return;
}
SDL_SendWindowEvent(window->id, SDL_WINDOWEVENT_HIDDEN, 0, 0);
if (_this->HideWindow) {
......@@ -1109,7 +1080,6 @@ SDL_RaiseWindow(SDL_WindowID windowID)
if (!window || !(window->flags & SDL_WINDOW_SHOWN)) {
return;
}
if (_this->RaiseWindow) {
_this->RaiseWindow(_this, window);
}
......@@ -1123,7 +1093,6 @@ SDL_MaximizeWindow(SDL_WindowID windowID)
if (!window || (window->flags & SDL_WINDOW_MAXIMIZED)) {
return;
}
SDL_SendWindowEvent(window->id, SDL_WINDOWEVENT_MAXIMIZED, 0, 0);
if (_this->MaximizeWindow) {
......@@ -1139,7 +1108,6 @@ SDL_MinimizeWindow(SDL_WindowID windowID)
if (!window || (window->flags & SDL_WINDOW_MINIMIZED)) {
return;
}
SDL_SendWindowEvent(window->id, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
if (_this->MinimizeWindow) {
......@@ -1156,7 +1124,6 @@ SDL_RestoreWindow(SDL_WindowID windowID)
|| (window->flags & (SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED))) {
return;
}
SDL_SendWindowEvent(window->id, SDL_WINDOWEVENT_RESTORED, 0, 0);
if (_this->RestoreWindow) {
......@@ -1172,14 +1139,12 @@ SDL_SetWindowFullscreen(SDL_WindowID windowID, int fullscreen)
if (!window) {
return -1;
}
if (fullscreen) {
fullscreen = SDL_WINDOW_FULLSCREEN;
}
if ((window->flags & SDL_WINDOW_FULLSCREEN) == fullscreen) {
return 0;
}
if (fullscreen) {
window->flags |= SDL_WINDOW_FULLSCREEN;
......@@ -1215,7 +1180,6 @@ SDL_SetWindowGrab(SDL_WindowID windowID, int mode)
if (!window || (!!mode == !!(window->flags & SDL_WINDOW_INPUT_GRABBED))) {
return;
}
if (mode) {
window->flags |= SDL_WINDOW_INPUT_GRABBED;
} else {
......@@ -1235,7 +1199,6 @@ SDL_GetWindowGrab(SDL_WindowID windowID)
if (!window) {
return 0;
}
return ((window->flags & SDL_WINDOW_INPUT_GRABBED) != 0);
}
......@@ -1301,7 +1264,6 @@ SDL_GetFocusWindow(void)
if (!_this) {
return 0;
}
display = &SDL_CurrentDisplay;
for (i = 0; i < display->num_windows; ++i) {
SDL_Window *window = &display->windows[i];
......@@ -1321,7 +1283,6 @@ SDL_DestroyWindow(SDL_WindowID windowID)
if (!_this) {
return;
}
/* Restore video mode, etc. */
SDL_SendWindowEvent(windowID, SDL_WINDOWEVENT_FOCUS_LOST, 0, 0);
......@@ -1392,7 +1353,6 @@ SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info)
SDL_UninitializedVideo();
return -1;
}
if (index < 0 || index >= SDL_GetNumRenderDrivers()) {
SDL_SetError("index must be in the range of 0 - %d",
SDL_GetNumRenderDrivers() - 1);
......@@ -1410,7 +1370,6 @@ SDL_CreateRenderer(SDL_WindowID windowID, int index, Uint32 flags)
if (!window) {
return 0;
}
if (index < 0) {
const char *override = SDL_getenv("SDL_VIDEO_RENDERER");
int n = SDL_GetNumRenderDrivers();
......@@ -1433,13 +1392,11 @@ SDL_CreateRenderer(SDL_WindowID windowID, int index, Uint32 flags)
return -1;
}
}
if (index >= SDL_GetNumRenderDrivers()) {
SDL_SetError("index must be -1 or in the range of 0 - %d",
SDL_GetNumRenderDrivers() - 1);
return -1;
}
/* Free any existing renderer */
SDL_DestroyRenderer(windowID);
......@@ -1477,7 +1434,6 @@ SDL_GetRendererInfo(SDL_RendererInfo * info)
SDL_UninitializedVideo();
return -1;
}
if (!SDL_CurrentDisplay.current_renderer) {
SDL_SetError("There is no current renderer");
return -1;
......@@ -1497,18 +1453,15 @@ SDL_CreateTexture(Uint32 format, int access, int w, int h)
SDL_UninitializedVideo();
return 0;
}
renderer = SDL_CurrentDisplay.current_renderer;
if (!renderer || !renderer->CreateTexture) {
return 0;
}
texture = (SDL_Texture *) SDL_calloc(1, sizeof(*texture));
if (!texture) {
SDL_OutOfMemory();
return 0;
}
texture->id = _this->next_object_id++;
texture->format = format;
texture->access = access;
......@@ -1527,7 +1480,6 @@ SDL_CreateTexture(Uint32 format, int access, int w, int h)
SDL_free(texture);
return 0;
}
hash = (texture->id % SDL_arraysize(SDL_CurrentDisplay.textures));
texture->next = SDL_CurrentDisplay.textures[hash];
SDL_CurrentDisplay.textures[hash] = texture;
......@@ -1585,7 +1537,6 @@ SDL_CreateTextureFromSurface(Uint32 format, SDL_Surface * surface)
if (!textureID) {
return 0;
}
if (bpp == fmt->BitsPerPixel && Rmask == fmt->Rmask && Gmask == fmt->Gmask
&& Bmask == fmt->Bmask && Amask == fmt->Amask) {
if (SDL_MUSTLOCK(surface)) {
......@@ -1611,12 +1562,14 @@ SDL_CreateTextureFromSurface(Uint32 format, SDL_Surface * surface)
dst_fmt->palette =
SDL_AllocPalette((1 << SDL_BITSPERPIXEL(format)));
if (dst_fmt->palette) {
/* FIXME: Should we try to copy fmt->palette? */
/*
* FIXME: Should we try to copy
* fmt->palette?
*/
SDL_DitherColors(dst_fmt->palette->colors,
SDL_BITSPERPIXEL(format));
}
}
dst = SDL_ConvertSurface(surface, dst_fmt, 0);
if (dst) {
SDL_UpdateTexture(textureID, NULL, dst->pixels, dst->pitch);
......@@ -1637,7 +1590,6 @@ SDL_CreateTextureFromSurface(Uint32 format, SDL_Surface * surface)
SDL_SetTexturePalette(textureID, fmt->palette->colors, 0,
fmt->palette->ncolors);
}
return textureID;
}
......@@ -1650,7 +1602,6 @@ SDL_GetTextureFromID(SDL_TextureID textureID)
if (!_this) {
return NULL;
}
hash = (textureID % SDL_arraysize(SDL_CurrentDisplay.textures));
for (texture = SDL_CurrentDisplay.textures[hash]; texture;
texture = texture->next) {
......@@ -1670,7 +1621,6 @@ SDL_QueryTexture(SDL_TextureID textureID, Uint32 * format, int *access,
if (!texture) {
return -1;
}
if (format) {
*format = texture->format;
}
......@@ -1695,7 +1645,6 @@ SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int *pitch)
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (!renderer->QueryTexturePixels) {
return -1;
......@@ -1713,7 +1662,6 @@ SDL_SetTexturePalette(SDL_TextureID textureID, const SDL_Color * colors,
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (!renderer->SetTexturePalette) {
return -1;
......@@ -1732,7 +1680,6 @@ SDL_GetTexturePalette(SDL_TextureID textureID, SDL_Color * colors,
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (!renderer->GetTexturePalette) {
return -1;
......@@ -1750,7 +1697,6 @@ SDL_SetTextureColorMod(SDL_TextureID textureID, Uint8 r, Uint8 g, Uint8 b)
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (!renderer->SetTextureColorMod) {
return -1;
......@@ -1776,7 +1722,6 @@ SDL_GetTextureColorMod(SDL_TextureID textureID, Uint8 * r, Uint8 * g,
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (r) {
*r = texture->r;
......@@ -1799,7 +1744,6 @@ SDL_SetTextureAlphaMod(SDL_TextureID textureID, Uint8 alpha)
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (!renderer->SetTextureAlphaMod) {
return -1;
......@@ -1821,7 +1765,6 @@ SDL_GetTextureAlphaMod(SDL_TextureID textureID, Uint8 * alpha)
if (!texture) {
return -1;
}
if (alpha) {
*alpha = texture->a;
}
......@@ -1837,7 +1780,6 @@ SDL_SetTextureBlendMode(SDL_TextureID textureID, int blendMode)
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (!renderer->SetTextureBlendMode) {
return -1;
......@@ -1854,7 +1796,6 @@ SDL_GetTextureBlendMode(SDL_TextureID textureID, int *blendMode)
if (!texture) {
return -1;
}
if (blendMode) {
*blendMode = texture->blendMode;
}
......@@ -1870,7 +1811,6 @@ SDL_SetTextureScaleMode(SDL_TextureID textureID, int scaleMode)
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (!renderer->SetTextureScaleMode) {
return -1;
......@@ -1887,7 +1827,6 @@ SDL_GetTextureScaleMode(SDL_TextureID textureID, int *scaleMode)
if (!texture) {
return -1;
}
if (scaleMode) {
*scaleMode = texture->scaleMode;
}
......@@ -1905,12 +1844,10 @@ SDL_UpdateTexture(SDL_TextureID textureID, const SDL_Rect * rect,
if (!texture) {
return -1;
}
renderer = texture->renderer;
if (!renderer->UpdateTexture) {
return -1;
}
if (!rect) {
full_rect.x = 0;
full_rect.y = 0;
......@@ -1918,7 +1855,6 @@ SDL_UpdateTexture(SDL_TextureID textureID, const SDL_Rect * rect,
full_rect.h = texture->h;
rect = &full_rect;
}
return renderer->UpdateTexture(renderer, texture, rect, pixels, pitch);
}
......@@ -1937,12 +1873,10 @@ SDL_LockTexture(SDL_TextureID textureID, const SDL_Rect * rect, int markDirty,
SDL_SetError("SDL_LockTexture(): texture must be streaming");
return -1;
}
renderer = texture->renderer;
if (!renderer->LockTexture) {
return -1;
}
if (!rect) {
full_rect.x = 0;
full_rect.y = 0;
......@@ -1950,7 +1884,6 @@ SDL_LockTexture(SDL_TextureID textureID, const SDL_Rect * rect, int markDirty,
full_rect.h = texture->h;
rect = &full_rect;
}
return renderer->LockTexture(renderer, texture, rect, markDirty, pixels,
pitch);
}
......@@ -1967,7 +1900,6 @@ SDL_UnlockTexture(SDL_TextureID textureID)
if (texture->access != SDL_TEXTUREACCESS_STREAMING) {
return;
}
renderer = texture->renderer;
if (!renderer->UnlockTexture) {
return;
......@@ -1988,7 +1920,6 @@ SDL_DirtyTexture(SDL_TextureID textureID, int numrects,
if (texture->access != SDL_TEXTUREACCESS_STREAMING) {
return;
}
renderer = texture->renderer;
if (!renderer->DirtyTexture) {
return;
......@@ -2007,12 +1938,10 @@ SDL_RenderFill(Uint8 r, Uint8 g, Uint8 b, Uint8 a, const SDL_Rect * rect)
SDL_UninitializedVideo();
return -1;
}
renderer = SDL_CurrentDisplay.current_renderer;
if (!renderer || !renderer->RenderFill) {
return -1;
}
window = SDL_GetWindowFromID(renderer->window);
real_rect.x = 0;
real_rect.y = 0;
......@@ -2023,7 +1952,6 @@ SDL_RenderFill(Uint8 r, Uint8 g, Uint8 b, Uint8 a, const SDL_Rect * rect)
return 0;
}
}
return renderer->RenderFill(renderer, r, g, b, a, &real_rect);
}
......@@ -2040,12 +1968,10 @@ SDL_RenderCopy(SDL_TextureID textureID, const SDL_Rect * srcrect,
if (!texture || texture->renderer != SDL_CurrentDisplay.current_renderer) {
return -1;
}
renderer = SDL_CurrentDisplay.current_renderer;
if (!renderer || !renderer->RenderCopy) {
return -1;
}
window = SDL_GetWindowFromID(renderer->window);
if (srcrect) {
real_srcrect = *srcrect;
......@@ -2077,7 +2003,6 @@ SDL_RenderPresent(void)
SDL_UninitializedVideo();
return;
}
renderer = SDL_CurrentDisplay.current_renderer;
if (!renderer || !renderer->RenderPresent) {
return;
......@@ -2096,7 +2021,6 @@ SDL_DestroyTexture(SDL_TextureID textureID)
SDL_UninitializedVideo();
return;
}
/* Look up the texture in the hash table */
hash = (textureID % SDL_arraysize(SDL_CurrentDisplay.textures));
prev = NULL;
......@@ -2109,7 +2033,6 @@ SDL_DestroyTexture(SDL_TextureID textureID)
if (!texture) {
return;
}
/* Unlink the texture from the list */
if (prev) {
prev->next = texture->next;
......@@ -2133,12 +2056,10 @@ SDL_DestroyRenderer(SDL_WindowID windowID)
if (!window) {
return;
}
renderer = window->renderer;
if (!renderer) {
return;
}
/* Free existing textures for this renderer */
for (i = 0; i < SDL_arraysize(SDL_CurrentDisplay.textures); ++i) {
SDL_Texture *texture;
......@@ -2179,7 +2100,6 @@ SDL_VideoQuit(void)
if (!_this) {
return;
}
/* Halt event processing before doing anything else */
SDL_StopEventLoop();
......@@ -2248,7 +2168,6 @@ SDL_GL_LoadLibrary(const char *path)
SDL_UninitializedVideo();
return -1;
}
if (_this->GL_LoadLibrary) {
retval = _this->GL_LoadLibrary(_this, path);
} else {
......@@ -2267,7 +2186,6 @@ SDL_GL_GetProcAddress(const char *proc)
SDL_UninitializedVideo();
return NULL;
}
func = NULL;
if (_this->GL_GetProcAddress) {
if (_this->gl_config.driver_loaded) {
......@@ -2295,13 +2213,11 @@ SDL_GL_ExtensionSupported(const char *extension)
if (where || *extension == '\0') {
return SDL_FALSE;
}
/* See if there's an environment variable override */
start = SDL_getenv(extension);
if (start && *start == '0') {
return SDL_FALSE;
}
/* Lookup the available extensions */
glGetStringFunc = SDL_GL_GetProcAddress("glGetString");
if (glGetStringFunc) {
......@@ -2312,10 +2228,10 @@ SDL_GL_ExtensionSupported(const char *extension)
if (!extensions) {
return SDL_FALSE;
}
/* It takes a bit of care to be fool-proof about parsing the
* OpenGL extensions string. Don't be fooled by sub-strings,
* etc. */
/*
* It takes a bit of care to be fool-proof about parsing the OpenGL
* extensions string. Don't be fooled by sub-strings, etc.
*/
start = extensions;
......@@ -2347,7 +2263,6 @@ SDL_GL_SetAttribute(SDL_GLattr attr, int value)
SDL_UninitializedVideo();
return -1;
}
retval = 0;
switch (attr) {
case SDL_GL_RED_SIZE:
......@@ -2469,7 +2384,10 @@ SDL_GL_GetAttribute(SDL_GLattr attr, int *value)
GLint bits = 0;
GLint component;
/* there doesn't seem to be a single flag in OpenGL for this! */
/*
* there doesn't seem to be a single flag in OpenGL
* for this!
*/
glGetIntegervFunc(GL_RED_BITS, &component);
bits += component;
glGetIntegervFunc(GL_GREEN_BITS, &component);
......@@ -2538,7 +2456,6 @@ SDL_GL_SetSwapInterval(int interval)
SDL_UninitializedVideo();
return -1;
}
if (_this->GL_SetSwapInterval) {
return _this->GL_SetSwapInterval(_this, interval);
} else {
......@@ -2554,7 +2471,6 @@ SDL_GL_GetSwapInterval(void)
SDL_UninitializedVideo();
return -1;
}
if (_this->GL_GetSwapInterval) {
return _this->GL_GetSwapInterval(_this);
} else {
......@@ -2589,8 +2505,10 @@ SDL_GL_DeleteContext(SDL_GLContext context)
}
#if 0 // FIXME
/* Utility function used by SDL_WM_SetIcon();
* flags & 1 for color key, flags & 2 for alpha channel. */
/*
* Utility function used by SDL_WM_SetIcon(); flags & 1 for color key, flags
* & 2 for alpha channel.
*/
static void
CreateMaskFromColorKeyOrAlpha(SDL_Surface * icon, Uint8 * mask, int flags)
{
......@@ -2686,7 +2604,7 @@ SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask)
#endif
SDL_bool
SDL_GetWindowWMInfo(SDL_WindowID windowID, struct SDL_SysWMinfo *info)
SDL_GetWindowWMInfo(SDL_WindowID windowID, struct SDL_SysWMinfo * info)
{
SDL_Window *window = SDL_GetWindowFromID(windowID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment