Commit 9b049159 authored by Sam Lantinga's avatar Sam Lantinga

If you pass in texture format 0, it'll use the first supported texture format.

parent 05b0c40f
......@@ -260,6 +260,9 @@ SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int
CHECK_RENDERER_MAGIC(renderer, NULL);
if (!format) {
format = renderer->info.texture_formats[0];
}
if (SDL_ISPIXELFORMAT_INDEXED(format)) {
SDL_SetError("Palettized textures are not supported");
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment