From e04e63907bf94a93e0abfe2f19e64962af9b3045 Mon Sep 17 00:00:00 2001 From: condret Date: Mon, 28 Oct 2024 21:06:24 +0100 Subject: [PATCH] fix build --- Makefile | 2 +- include/gb.h | 5 ++++- io/dma.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index cfa11d3..96a09ce 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ LDFLAGS = $(shell pkg-config --libs sdl2 r_util r_io) -CFLAGS = -Wall -I include/ $(shell pkg-config --cflags sdl2 r_util r_io) +CFLAGS = -Wall -I include/ $(shell pkg-config --cflags sdl2 r_util r_io r_arch r_esil) all: sdl/pixbuf.o io/timers.o io/mbc1.o io/mbc2.o io/joypad.o io/dma.o diff --git a/include/gb.h b/include/gb.h index 709dd3b..d2d2306 100644 --- a/include/gb.h +++ b/include/gb.h @@ -1,6 +1,9 @@ #ifndef GB_H #define GB_H +#include #include +#include +#include enum { GB_TIMERS_DIV = 0, @@ -110,7 +113,7 @@ typedef struct gameboy_t { } GB; -GBPPU *gb_ppu_open (RIO *io) +GBPPU *gb_ppu_open (RIO *io); void gb_ppu_update (GB *gb, ut32 cycles); void gb_ppu_close (GBPPU *ppu); diff --git a/io/dma.c b/io/dma.c index 2d18a7c..0fb1b4b 100644 --- a/io/dma.c +++ b/io/dma.c @@ -193,7 +193,7 @@ GBDMA *gb_dma_open (RIO *io) { memset (uri, 0x00, sizeof (char) * 64); strcpy (uri, "malloc://0xa0"); dma->oam_fd = r_io_fd_open (io, uri, R_PERM_RWX, 0); - if (oam_fd < 0) { + if (dma->oam_fd < 0) { r_io_bank_free (bank); free (dma); return NULL;