changeset 1758:95e387e1d63c mame_interp

Fix build
author Michael Pavone <pavone@retrodev.com>
date Tue, 19 Feb 2019 07:03:57 +0000
parents 956c1cce05e2
children 63256371046f
files Makefile genesis.c sms.c
diffstat 3 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Jan 24 19:15:59 2019 -0800
+++ b/Makefile	Tue Feb 19 07:03:57 2019 +0000
@@ -39,7 +39,11 @@
 FONT:=nuklear_ui/font_mac.o
 else
 ifdef USE_GLES
+ifdef GLES_LIB
+LIBS=sdl2
+else
 LIBS=sdl2 glesv2
+endif
 CFLAGS+= -DUSE_GLES
 else
 LIBS=sdl2 glew gl
@@ -87,7 +91,7 @@
 LDFLAGS:=-lm
 else
 CFLAGS:=$(shell pkg-config --cflags-only-I $(LIBS)) $(CFLAGS)
-LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS))
+LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) $(GLES_LIB)
 endif #libblastem.so
 
 ifeq ($(OS),Darwin)
--- a/genesis.c	Thu Jan 24 19:15:59 2019 -0800
+++ b/genesis.c	Tue Feb 19 07:03:57 2019 +0000
@@ -188,8 +188,10 @@
 	deserialize_buffer buffer;
 	init_deserialize(&buffer, data, size);
 	genesis_deserialize(&buffer, gen);
+#ifdef USE_NATIVE
 	//HACK: Fix this once PC/IR is represented in a better way in 68K core
 	gen->m68k->resume_pc = get_native_address_trans(gen->m68k, gen->m68k->last_prefetch_address);
+#endif
 }
 
 uint16_t read_dma_value(uint32_t address)
--- a/sms.c	Thu Jan 24 19:15:59 2019 -0800
+++ b/sms.c	Tue Feb 19 07:03:57 2019 +0000
@@ -482,7 +482,9 @@
 {
 	sms_context *sms = (sms_context *)system;
 	sms->should_return = 1;
+#ifdef USE_NATIVE
 	sms->z80->target_cycle = sms->z80->sync_cycle = sms->z80->current_cycle;
+#endif
 }
 
 static void inc_debug_mode(system_header *system)