mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
No need to call png_init every time
This commit is contained in:
parent
cd00c4c04b
commit
3c9d1ab804
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue