From 119ff7f2f3ec9c8cf7204fa54f5376212e014e47 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 19 May 2019 14:07:00 +0200 Subject: [PATCH] SDL: Don't include png.h when building without libpng Should make possible to build on AmigaOS 4 where the Image namespace conflicts with a struct from the SDK. --- backends/graphics/openglsdl/openglsdl-graphics.cpp | 2 ++ backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 33b907c2f8a..2c65a056c42 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -37,7 +37,9 @@ #include "graphics/opengl/system_headers.h" #include "graphics/opengl/texture.h" #include "graphics/opengl/tiledsurface.h" +#ifdef USE_PNG #include "image/png.h" +#endif OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window, const Capabilities &capabilities) : diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index dca48617253..a006cd74229 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -31,7 +31,9 @@ #include "engines/engine.h" #include "graphics/pixelbuffer.h" #include "graphics/surface.h" +#ifdef USE_PNG #include "image/png.h" +#endif SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window, const Capabilities &capabilities) :