diff src/video/directfb/SDL_DirectFB_render.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 58c1b9ec7074
children f7b03b6838cb
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_render.c	Thu Jan 21 05:49:41 2010 +0000
+++ b/src/video/directfb/SDL_DirectFB_render.c	Thu Jan 21 06:21:52 2010 +0000
@@ -280,7 +280,7 @@
 DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags)
 {
     SDL_DFB_WINDOWDATA(window);
-    SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
+    SDL_VideoDisplay *display = window->display;
     SDL_Renderer *renderer = NULL;
     DirectFB_RenderData *data = NULL;
     DFBResult ret;
@@ -313,7 +313,7 @@
     renderer->DestroyTexture = DirectFB_DestroyTexture;
     renderer->DestroyRenderer = DirectFB_DestroyRenderer;
     renderer->info = DirectFB_RenderDriver.info;
-    renderer->window = window->id;      /* SDL window id */
+    renderer->window = window;      /* SDL window */
     renderer->driverdata = data;
 
     renderer->info.flags =
@@ -446,7 +446,7 @@
 {
     SDL_DFB_RENDERERDATA(renderer);
     SDL_Window *window = SDL_GetWindowFromID(renderer->window);
-    SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
+    SDL_VideoDisplay *display = window->display;
     SDL_DFB_DEVICEDATA(display->device);
     DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
     DirectFB_TextureData *data = texture->driverdata;
@@ -502,7 +502,7 @@
 DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
 {
     SDL_Window *window = SDL_GetWindowFromID(renderer->window);
-    SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
+    SDL_VideoDisplay *display = window->display;
     SDL_DFB_DEVICEDATA(display->device);
     DirectFB_TextureData *data;
     DFBResult ret;