equal
deleted
inserted
replaced
1647 } |
1647 } |
1648 if (!renderer->CreateTexture) { |
1648 if (!renderer->CreateTexture) { |
1649 SDL_Unsupported(); |
1649 SDL_Unsupported(); |
1650 return 0; |
1650 return 0; |
1651 } |
1651 } |
|
1652 if (w <= 0 || h <= 0) { |
|
1653 SDL_SetError("Texture dimensions can't be 0"); |
|
1654 return 0; |
|
1655 } |
1652 texture = (SDL_Texture *) SDL_calloc(1, sizeof(*texture)); |
1656 texture = (SDL_Texture *) SDL_calloc(1, sizeof(*texture)); |
1653 if (!texture) { |
1657 if (!texture) { |
1654 SDL_OutOfMemory(); |
1658 SDL_OutOfMemory(); |
1655 return 0; |
1659 return 0; |
1656 } |
1660 } |