Skip to content

Commit

Permalink
Merge pull request #884 from zakk4223/libchdr_update
Browse files Browse the repository at this point in the history
Libchdr update
  • Loading branch information
sorgelig authored Mar 13, 2024
2 parents 6ab4f00 + 9d7f739 commit 09d301f
Show file tree
Hide file tree
Showing 132 changed files with 35,079 additions and 33,934 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ INCLUDE += -I./lib/libco
INCLUDE += -I./lib/miniz
INCLUDE += -I./lib/md5
INCLUDE += -I./lib/lzma
INCLUDE += -I./lib/zstd/lib
INCLUDE += -I./lib/libchdr/include
INCLUDE += -I./lib/flac/include
INCLUDE += -I./lib/flac/src/include
INCLUDE += -I./lib/bluetooth
INCLUDE += -I./lib/serial_server/library

Expand All @@ -32,7 +31,8 @@ C_SRC = $(wildcard *.c) \
$(wildcard ./lib/miniz/*.c) \
$(wildcard ./lib/md5/*.c) \
$(wildcard ./lib/lzma/*.c) \
$(wildcard ./lib/flac/src/*.c) \
$(wildcard ./lib/zstd/lib/common/*.c) \
$(wildcard ./lib/zstd/lib/decompress/*.c) \
$(wildcard ./lib/libchdr/*.c) \
lib/libco/arm.c

Expand All @@ -47,7 +47,7 @@ IMLIB2_LIB = -Llib/imlib2 -lfreetype -lbz2 -lpng16 -lz -lImlib2
OBJ = $(C_SRC:.c=.c.o) $(CPP_SRC:.cpp=.cpp.o) $(IMG:.png=.png.o)
DEP = $(C_SRC:.c=.c.d) $(CPP_SRC:.cpp=.cpp.d)

DFLAGS = $(INCLUDE) -D_7ZIP_ST -DPACKAGE_VERSION=\"1.3.3\" -DFLAC_API_EXPORTS -DFLAC__HAS_OGG=0 -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H -DENABLE_64_BIT_WORDS=0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DVDATE=\"`date +"%y%m%d"`\"
DFLAGS = $(INCLUDE) -D_7ZIP_ST -DPACKAGE_VERSION=\"1.3.3\" -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H -DENABLE_64_BIT_WORDS=0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DVDATE=\"`date +"%y%m%d"`\"
CFLAGS = $(DFLAGS) -Wall -Wextra -Wno-strict-aliasing -Wno-stringop-overflow -Wno-stringop-truncation -Wno-format-truncation -Wno-psabi -Wno-restrict -c -O3
LFLAGS = -lc -lstdc++ -lm -lrt $(IMLIB2_LIB) -Llib/bluetooth -lbluetooth -lpthread

Expand Down
1 change: 1 addition & 0 deletions cd.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ typedef struct
int last;
int sectorSize;
chd_file *chd_f;
int chd_hunksize;
cd_track_t tracks[100];
fileTYPE sub;

Expand Down
2 changes: 1 addition & 1 deletion ide_cdrom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ static const char* load_chd_file(drive_t *drv, const char *chdfile)
free(drv->chd_hunkbuf);
}

drv->chd_hunkbuf = (uint8_t *)malloc(CD_FRAME_SIZE * CD_FRAMES_PER_HUNK);
drv->chd_hunkbuf = (uint8_t *)malloc(tmpTOC.chd_hunksize);
drv->chd_hunknum = -1;
drv->chd_f = tmpTOC.chd_f;

Expand Down
Loading

0 comments on commit 09d301f

Please sign in to comment.