diff src/video/qnxgf/SDL_gf_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 4b594623401b
children f7b03b6838cb
line wrap: on
line diff
--- a/src/video/qnxgf/SDL_gf_render.c	Thu Jan 21 05:49:41 2010 +0000
+++ b/src/video/qnxgf/SDL_gf_render.c	Thu Jan 21 06:21:52 2010 +0000
@@ -110,7 +110,7 @@
 static SDL_Renderer *
 gf_createrenderer(SDL_Window * window, Uint32 flags)
 {
-    SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
+    SDL_VideoDisplay *display = window->display;
     SDL_DisplayData *didata = (SDL_DisplayData *) display->driverdata;
     SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
     SDL_Renderer *renderer = NULL;
@@ -162,7 +162,7 @@
     renderer->DestroyTexture = gf_destroytexture;
     renderer->DestroyRenderer = gf_destroyrenderer;
     renderer->info = gf_renderdriver.info;
-    renderer->window = window->id;
+    renderer->window = window;
     renderer->driverdata = rdata;
 
     /* Set render acceleration flag in case it is accelerated */
@@ -284,7 +284,7 @@
 gf_activaterenderer(SDL_Renderer * renderer)
 {
     SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata;
-    SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(rdata->window);
+    SDL_VideoDisplay *display = rdata->window->display;
     SDL_DisplayData *didata = (SDL_DisplayData *) display->driverdata;
 
     /* Setup current surface as visible */
@@ -301,7 +301,7 @@
 {
     SDL_RenderData *renderdata = (SDL_RenderData *) renderer->driverdata;
     SDL_Window *window = SDL_GetWindowFromID(renderer->window);
-    SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
+    SDL_VideoDisplay *display = window->display;
     SDL_TextureData *tdata = NULL;
 
     /* Allocate texture driver data */