Skip to content

Commit 3a2a13d

Browse files
committed
Loading PNG files are part of the core SDL library
Don't disable this functionality when defining SDL_LEAN_AND_MEAN, but if you need to, you can define SDL_DISABLE_STB if you want to compile this out. Fixes #15139 (cherry picked from commit 72d5fe2)
1 parent 48fb914 commit 3a2a13d

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/SDL_internal.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,6 @@
191191
#define SDL_VIDEO_RENDER_SW 1
192192
#endif
193193

194-
/* STB image conversion */
195-
#if !defined(SDL_HAVE_STB) && !defined(SDL_LEAN_AND_MEAN)
196-
#define SDL_HAVE_STB 1
197-
#endif
198-
199194
/* YUV formats
200195
- handling of YUV surfaces
201196
- blitting and conversion functions */

src/video/SDL_stb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
#include "SDL_stb_c.h"
2424
#include "SDL_surface_c.h"
2525

26+
/* STB image conversion */
27+
#ifndef SDL_DISABLE_STB
28+
#define SDL_HAVE_STB
29+
#endif
30+
2631
#ifdef SDL_HAVE_STB
2732
////////////////////////////////////////////////////////////////////////////
2833
#define malloc SDL_malloc

0 commit comments

Comments
 (0)