diff options
Diffstat (limited to 'src/video/win32/SDL_ceddrawrender.c')
-rw-r--r-- | src/video/win32/SDL_ceddrawrender.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/video/win32/SDL_ceddrawrender.c b/src/video/win32/SDL_ceddrawrender.c index 424a313eef..ccdbb43fac 100644 --- a/src/video/win32/SDL_ceddrawrender.c +++ b/src/video/win32/SDL_ceddrawrender.c @@ -391,7 +391,7 @@ DDRAW_AddRenderDriver(_THIS) { SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; SDL_RendererInfo *info = &DDRAW_RenderDriver.info; - SDL_DisplayMode *mode = &SDL_CurrentDisplay.desktop_mode; + SDL_DisplayMode *mode = &SDL_CurrentDisplay->desktop_mode; if (data->ddraw) { int i; @@ -437,7 +437,7 @@ DDRAW_AddRenderDriver(_THIS) SDL_Renderer * DDRAW_CreateRenderer(SDL_Window * window, Uint32 flags) { - SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); + SDL_VideoDisplay *display = window->display; SDL_VideoData *videodata = (SDL_VideoData *) display->device->driverdata; SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata; SDL_Renderer *renderer; @@ -479,7 +479,7 @@ DDRAW_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->DestroyTexture = DDRAW_DestroyTexture; renderer->DestroyRenderer = DDRAW_DestroyRenderer; renderer->info = DDRAW_RenderDriver.info; - renderer->window = window->id; + renderer->window = window; renderer->driverdata = data; renderer->info.flags = SDL_RENDERER_ACCELERATED; @@ -568,8 +568,8 @@ DDRAW_DisplayModeChanged(SDL_Renderer * renderer) { //TODO implement /*D3D_RenderData *data = (D3D_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; data->pparams.BackBufferWidth = window->w; data->pparams.BackBufferHeight = window->h; @@ -587,8 +587,8 @@ static int DDRAW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) { DDRAW_RenderData *renderdata = (DDRAW_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; Uint32 display_format = display->current_mode.format; DDRAW_TextureData *data; DDSURFACEDESC ddsd; |