TsundereStation/dep/libchdr
libretroadmin 32e5654cb4 stb/miniz: drop stdio paths, leave VFS/memory-only code
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.
2026-06-25 14:59:59 +02:00
..
deps stb/miniz: drop stdio paths, leave VFS/memory-only code 2026-06-25 14:59:59 +02:00
include Route all file I/O through libretro VFS; remove non-VFS codepaths 2026-06-25 14:55:50 +02:00
src Route all file I/O through libretro VFS; remove non-VFS codepaths 2026-06-25 14:55:50 +02:00
tests Update libchdr. 2026-03-12 21:17:40 +00:00
.gitignore Update libchdr. 2026-03-12 21:17:40 +00:00
CMakeLists.txt Update libchdr. 2026-03-12 21:17:40 +00:00
LICENSE.txt dep/libchdr: Sync to upstream (82670d5) 2020-12-01 23:34:21 +10:00
pkg-config.pc.in Update libchdr. 2026-03-12 21:17:40 +00:00
README.md dep/libchdr: Sync to upstream (82670d5) 2020-12-01 23:34:21 +10:00
unity.c Update libchdr. 2026-03-12 21:17:40 +00:00

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/).