Mercurial > sdl-ios-xcode
diff src/video/SDL_renderer_sw.c @ 3685:64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 21 Jan 2010 06:21:52 +0000 |
parents | 0f958e527e5e |
children | f7b03b6838cb |
line wrap: on
line diff
--- a/src/video/SDL_renderer_sw.c Thu Jan 21 05:49:41 2010 +0000 +++ b/src/video/SDL_renderer_sw.c Thu Jan 21 06:21:52 2010 +0000 @@ -201,7 +201,7 @@ SDL_Renderer * SW_CreateRenderer(SDL_Window * window, Uint32 flags) { - SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); + SDL_VideoDisplay *display = window->display; SDL_DisplayMode *displayMode = &display->current_mode; SDL_Renderer *renderer; SW_RenderData *data; @@ -243,7 +243,7 @@ renderer->DestroyRenderer = SW_DestroyRenderer; renderer->info.name = SW_RenderDriver.info.name; renderer->info.flags = 0; - renderer->window = window->id; + renderer->window = window; renderer->driverdata = data; Setup_SoftwareRenderer(renderer); @@ -321,7 +321,7 @@ SW_ActivateRenderer(SDL_Renderer * renderer) { SW_RenderData *data = (SW_RenderData *) renderer->driverdata; - SDL_Window *window = SDL_GetWindowFromID(renderer->window); + SDL_Window *window = renderer->window; int i, n; if (data->renderer && data->renderer->ActivateRenderer) { @@ -794,7 +794,7 @@ const SDL_Rect * srcrect, const SDL_Rect * dstrect) { SW_RenderData *data = (SW_RenderData *) renderer->driverdata; - SDL_Window *window = SDL_GetWindowFromID(renderer->window); + SDL_Window *window = renderer->window; int status; if (data->renderer->info.flags & SDL_RENDERER_PRESENTCOPY) { @@ -928,8 +928,8 @@ SW_DestroyRenderer(SDL_Renderer * renderer) { SW_RenderData *data = (SW_RenderData *) renderer->driverdata; - SDL_Window *window = SDL_GetWindowFromID(renderer->window); - SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); + SDL_Window *window = renderer->window; + SDL_VideoDisplay *display = window->display; int i; if (data) {