| 1818 | } |
| 1819 | |
| 1820 | void |
| 1821 | SDL_UnlockTexture(SDL_Texture * texture) |
| 1822 | { |
| 1823 | CHECK_TEXTURE_MAGIC(texture, ); |
| 1824 | |
| 1825 | if (texture->access != SDL_TEXTUREACCESS_STREAMING) { |
| 1826 | return; |
| 1827 | } |
| 1828 | #if SDL_HAVE_YUV |
| 1829 | if (texture->yuv) { |
| 1830 | SDL_UnlockTextureYUV(texture); |
| 1831 | } else |
| 1832 | #endif |
| 1833 | if (texture->native) { |
| 1834 | SDL_UnlockTextureNative(texture); |
| 1835 | } else { |
| 1836 | SDL_Renderer *renderer = texture->renderer; |
| 1837 | renderer->UnlockTexture(renderer, texture); |
| 1838 | } |
| 1839 | |
| 1840 | SDL_FreeSurface(texture->locked_surface); |
| 1841 | texture->locked_surface = NULL; |
| 1842 | } |
| 1843 | |
| 1844 | SDL_bool |
| 1845 | SDL_RenderTargetSupported(SDL_Renderer *renderer) |