diff src/video/photon/SDL_photon_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/photon/SDL_photon_render.c	Thu Jan 21 05:49:41 2010 +0000
+++ b/src/video/photon/SDL_photon_render.c	Thu Jan 21 06:21:52 2010 +0000
@@ -124,7 +124,7 @@
 static SDL_Renderer *
 photon_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;
@@ -171,7 +171,7 @@
     renderer->DestroyTexture = photon_destroytexture;
     renderer->DestroyRenderer = photon_destroyrenderer;
     renderer->info = photon_renderdriver.info;
-    renderer->window = window->id;
+    renderer->window = window;
     renderer->driverdata = rdata;
 
     /* Copy direct_mode status */
@@ -298,7 +298,7 @@
     /* Obtain window and display structures */
     window=SDL_GetWindowFromID(renderer->window);
     wdata=(SDL_WindowData*)window->driverdata;
-    display=SDL_GetDisplayFromWindow(window);
+    display=window->display;
     didata=(SDL_DisplayData *) display->driverdata;
     phdata=(SDL_VideoData *) display->device->driverdata;
 
@@ -723,7 +723,7 @@
 {
     SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata;
     SDL_Window *window = SDL_GetWindowFromID(renderer->window);
-    SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
+    SDL_VideoDisplay *display = window->display;
     SDL_DisplayData *didata = (SDL_DisplayData *) display->driverdata;
 
     /* Copy direct_mode status */
@@ -738,7 +738,7 @@
 {
     SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata;
     SDL_Window *window = SDL_GetWindowFromID(renderer->window);
-    SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
+    SDL_VideoDisplay *display = window->display;
     SDL_DisplayData *didata = (SDL_DisplayData *) display->driverdata;
     SDL_TextureData *tdata = NULL;
     uint32_t it;