src/video/SDL_video.c
changeset 3316 9cf18687b761
parent 3315 87ffdad11607
child 3318 f085091f74cd
equal deleted inserted replaced
3315:87ffdad11607 3316:9cf18687b761
  2415     SDL_Renderer *renderer;
  2415     SDL_Renderer *renderer;
  2416     SDL_Window *window;
  2416     SDL_Window *window;
  2417     SDL_Rect real_srcrect;
  2417     SDL_Rect real_srcrect;
  2418     SDL_Rect real_dstrect;
  2418     SDL_Rect real_dstrect;
  2419 
  2419 
  2420     if (!texture || texture->renderer != SDL_CurrentDisplay.current_renderer) {
       
  2421         return -1;
       
  2422     }
       
  2423     renderer = SDL_CurrentDisplay.current_renderer;
  2420     renderer = SDL_CurrentDisplay.current_renderer;
  2424     if (!renderer) {
  2421     if (!renderer) {
       
  2422         SDL_SetError("No current renderer available");
       
  2423         return -1;
       
  2424     }
       
  2425     if (!texture) {
       
  2426         SDL_SetError("Texture not found");
       
  2427         return -1;
       
  2428     }
       
  2429     if (texture->renderer != renderer) {
       
  2430         SDL_SetError("Texture was not created with this renderer");
  2425         return -1;
  2431         return -1;
  2426     }
  2432     }
  2427     if (!renderer->RenderCopy) {
  2433     if (!renderer->RenderCopy) {
  2428         SDL_Unsupported();
  2434         SDL_Unsupported();
  2429         return -1;
  2435         return -1;