1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-08 00:01:24 +00:00

Merge pull request #513 from josephcsible/textureerror

Print the filename and error when failing to open a texture
This commit is contained in:
Zeno Rogue
2026-04-20 14:17:51 +02:00
committed by GitHub

View File

@@ -258,7 +258,7 @@ bool texture_data::readtexture(string tn) {
#elif CAP_PNG
FILE *f = fopen(tn.c_str(), "rb");
if(!f) { printf("failed to open file\n"); return false; }
if(!f) { perror("fopen"); printf("failed to open file %s\n", tn.c_str()); return false; }
png_structp png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if(!png) { printf("failed to create_read_struct\n"); return false; }
if(setjmp(png_jmpbuf(png))) {