stb_image: STBI_NO_STDIO was never defined, and Common::LoadImageFromFile passed an RFILE* into stbi_load_from_file()'s FILE* parameter -- it only worked because stb_image.c compiles against real <stdio.h> and the pointer was treated opaquely. Fix the caller to read the file via FileSystem::ReadBinaryFile() and decode with stbi_load_from_memory(), then make no-stdio the only path in stb_image.h: remove every #ifndef STBI_NO_STDIO block (the <stdio.h> include, stbi__fopen/stbi__stdio_* read callbacks, stbi__start_file, and the stbi_load/loadf/info/is_hdr/is_16_bit _from_file + _from filename entry points) and the toggle itself. The decoder is now memory/callback-only. miniz: the libretro build compiles miniz.c directly (not via unity.c), so the MINIZ_NO_* defines unity.c sets were never applied and miniz built with its archive/deflate/stdio/time code active despite libchdr only using the inflate (tinfl / zlib-compat) API. Activate MINIZ_NO_STDIO, MINIZ_NO_TIME, MINIZ_NO_DEFLATE_APIS and MINIZ_NO_ARCHIVE_APIS in miniz.h so those paths (including all MZ_FOPEN/stdio file I/O) compile out by default; inflate and the zlib-compatible names libchdr needs are retained. |
||
|---|---|---|
| .. | ||
| deps | ||
| include | ||
| src | ||
| tests | ||
| .gitignore | ||
| CMakeLists.txt | ||
| LICENSE.txt | ||
| pkg-config.pc.in | ||
| README.md | ||
| unity.c | ||
libchdr
libchdr is a standalone library for reading MAME's CHDv1-v5 formats.
The code is based off of MAME's old C codebase which read up to CHDv4 with OS-dependent features removed, and CHDv5 support backported from MAME's current C++ codebase.
libchdr is licensed under the BSD 3-Clause (see LICENSE.txt) and uses third party libraries that are each distributed under their own terms (see each library's license in deps/).