sdl: Don't fail to build on ancient SDL2 installs.

This should fix the build on GitHub Actions.
This commit is contained in:
Ryan C. Gordon 2023-03-08 08:58:44 -05:00
parent 10732fa25c
commit 102edc718a
No known key found for this signature in database
GPG key ID: FA148B892AB48044

View file

@ -268,7 +268,9 @@ void DirkSimple_drawsprite(DirkSimple_Sprite *sprite, int sx, int sy, int sw, in
}
sprite->platform_handle = texture;
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
#if SDL_VERSION_ATLEAST(2.0.12) /* GitHub Actions has an ancient SDL, apparently... */
SDL_SetTextureScaleMode(texture, SDL_ScaleModeNearest);
#endif
SDL_UpdateTexture(texture, NULL, sprite->rgba, sprite->width * 4);
}