fix build

This commit is contained in:
condret 2024-10-28 21:06:24 +01:00
parent 21875865c4
commit e04e63907b
3 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -1,6 +1,9 @@
#ifndef GB_H
#define GB_H
#include <ragb_sdl.h>
#include <r_io.h>
#include <r_arch.h>
#include <r_esil.h>
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);

View File

@ -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;