Mercurial > sdl-ios-xcode
diff src/video/SDL_video.c @ 2810:27cb878a278e
Implemented the X11 (non-OpenGL) renderer, no alpha or scaling available.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 30 Nov 2008 21:58:23 +0000 |
parents | 985001797115 |
children | e841aa93e6be |
line wrap: on
line diff
--- a/src/video/SDL_video.c Sat Nov 29 21:48:14 2008 +0000 +++ b/src/video/SDL_video.c Sun Nov 30 21:58:23 2008 +0000 @@ -1476,7 +1476,11 @@ return 0; } renderer = SDL_CurrentDisplay.current_renderer; - if (!renderer || !renderer->CreateTexture) { + if (!renderer) { + return 0; + } + if (!renderer->CreateTexture) { + SDL_Unsupported(); return 0; } texture = (SDL_Texture *) SDL_calloc(1, sizeof(*texture)); @@ -1669,6 +1673,7 @@ } renderer = texture->renderer; if (!renderer->QueryTexturePixels) { + SDL_Unsupported(); return -1; } return renderer->QueryTexturePixels(renderer, texture, pixels, pitch); @@ -1686,6 +1691,7 @@ } renderer = texture->renderer; if (!renderer->SetTexturePalette) { + SDL_Unsupported(); return -1; } return renderer->SetTexturePalette(renderer, texture, colors, firstcolor, @@ -1704,6 +1710,7 @@ } renderer = texture->renderer; if (!renderer->GetTexturePalette) { + SDL_Unsupported(); return -1; } return renderer->GetTexturePalette(renderer, texture, colors, firstcolor, @@ -1721,6 +1728,7 @@ } renderer = texture->renderer; if (!renderer->SetTextureColorMod) { + SDL_Unsupported(); return -1; } if (r < 255 || g < 255 || b < 255) { @@ -1768,6 +1776,7 @@ } renderer = texture->renderer; if (!renderer->SetTextureAlphaMod) { + SDL_Unsupported(); return -1; } if (alpha < 255) { @@ -1804,6 +1813,7 @@ } renderer = texture->renderer; if (!renderer->SetTextureBlendMode) { + SDL_Unsupported(); return -1; } texture->blendMode = blendMode; @@ -1835,6 +1845,7 @@ } renderer = texture->renderer; if (!renderer->SetTextureScaleMode) { + SDL_Unsupported(); return -1; } texture->scaleMode = scaleMode; @@ -1868,6 +1879,7 @@ } renderer = texture->renderer; if (!renderer->UpdateTexture) { + SDL_Unsupported(); return -1; } if (!rect) { @@ -1897,6 +1909,7 @@ } renderer = texture->renderer; if (!renderer->LockTexture) { + SDL_Unsupported(); return -1; } if (!rect) { @@ -1961,7 +1974,11 @@ return -1; } renderer = SDL_CurrentDisplay.current_renderer; - if (!renderer || !renderer->RenderFill) { + if (!renderer) { + return -1; + } + if(!renderer->RenderFill) { + SDL_Unsupported(); return -1; } window = SDL_GetWindowFromID(renderer->window); @@ -1991,7 +2008,11 @@ return -1; } renderer = SDL_CurrentDisplay.current_renderer; - if (!renderer || !renderer->RenderCopy) { + if (!renderer) { + return -1; + } + if (!renderer->RenderCopy) { + SDL_Unsupported(); return -1; } window = SDL_GetWindowFromID(renderer->window);