From 3c9d1ab804a1bd28ffd95a286abacb166def5e27 Mon Sep 17 00:00:00 2001 From: def Date: Sat, 12 Dec 2020 17:51:09 +0100 Subject: [PATCH] No need to call png_init every time --- src/engine/client/graphics_threaded.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp index 0bd802f29..591f825dc 100644 --- a/src/engine/client/graphics_threaded.cpp +++ b/src/engine/client/graphics_threaded.cpp @@ -154,6 +154,8 @@ CGraphics_Threaded::CGraphics_Threaded() m_RenderEnable = true; m_DoScreenshot = false; + + png_init(0, 0); // ignore_convention } void CGraphics_Threaded::ClipEnable(int x, int y, int w, int h) @@ -521,8 +523,6 @@ int CGraphics_Threaded::LoadPNG(CImageInfo *pImg, const char *pFilename, int Sto png_t Png; // ignore_convention // open file for reading - png_init(0, 0); // ignore_convention - IOHANDLE File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, StorageType, aCompleteFilename, sizeof(aCompleteFilename)); if(File) io_close(File);