Created
March 8, 2012 23:32
-
-
Save Themaister/2004124 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b2ed2ca1dbcf5c9a03bd55f46e4aa32e54cc480f Mon Sep 17 00:00:00 2001 | |
From: Themaister <maister@archlinux.us> | |
Date: Fri, 9 Mar 2012 00:32:07 +0100 | |
Subject: [PATCH] Fix libsnes build. | |
--- | |
makefile.libsnes | 5 +++-- | |
src/burner/libsnes/generate_files.sh | 4 ++-- | |
src/burner/libsnes/libsnes.cpp | 4 ++-- | |
3 files changed, 7 insertions(+), 6 deletions(-) | |
mode change 100644 => 100755 src/burner/libsnes/generate_files.sh | |
diff --git a/makefile.libsnes b/makefile.libsnes | |
index 8cfdc50..efdca30 100644 | |
--- a/makefile.libsnes | |
+++ b/makefile.libsnes | |
@@ -58,13 +58,14 @@ MAIN_FBA_DIR := src | |
FBA_BURN_DIR := $(MAIN_FBA_DIR)/burn | |
FBA_BURN_DRIVERS_DIR := $(MAIN_FBA_DIR)/burn/drv | |
FBA_BURNER_DIR := $(MAIN_FBA_DIR)/burner | |
-LIBSNES_DIR := libsnes | |
+LIBSNES_DIR := $(FBA_BURNER_DIR)/libsnes | |
FBA_CPU_DIR := $(MAIN_FBA_DIR)/cpu | |
FBA_LIB_DIR := $(MAIN_FBA_DIR)/dep/libs | |
FBA_INTERFACE_DIR := $(MAIN_FBA_DIR)/intf | |
BURN_BLACKLIST := $(FBA_BURN_DIR)/zet_c68k.cpp \ | |
$(FBA_BURN_DIR)/sek_c68k.cpp \ | |
+ $(FBA_BURNER_DIR)/un7z.cpp \ | |
$(FBA_BURNER_DIR)/tracklst.cpp \ | |
$(FBA_CPU_DIR)/arm7/arm7exec.c \ | |
$(FBA_CPU_DIR)/arm7/arm7core.c \ | |
@@ -173,7 +174,7 @@ endif | |
CFLAGS += -std=gnu99 $(fpic) -Wno-write-strings $(FBA_DEFINES) | |
CXXFLAGS += $(fpic) -Wno-write-strings $(FBA_DEFINES) | |
-LDFLAGS += -Wl,-no-undefined $(fpic) -Wl,--version-script=libsnes/link.T | |
+LDFLAGS += -Wl,-no-undefined $(fpic) -Wl,--version-script=$(LIBSNES_DIR)/link.T | |
INCDIRS := -I$(FBA_BURNER_DIR)/win32 \ | |
-I$(LIBSNES_DIR) \ | |
diff --git a/src/burner/libsnes/generate_files.sh b/src/burner/libsnes/generate_files.sh | |
old mode 100644 | |
new mode 100755 | |
index 03ebb0f..cb6bd10 | |
--- a/src/burner/libsnes/generate_files.sh | |
+++ b/src/burner/libsnes/generate_files.sh | |
@@ -1,11 +1,11 @@ | |
#!/bin/bash | |
-if [ -f ../src/generated/driverlist.h ]; then | |
+if [ -f ../../generated/driverlist.h ]; then | |
echo "Generated files already built ..." | |
exit 0 | |
fi | |
-cd ../src | |
+cd ../.. | |
mkdir -p generated | |
#generate gamelist.txt and generated/driverlist.h | |
diff --git a/src/burner/libsnes/libsnes.cpp b/src/burner/libsnes/libsnes.cpp | |
index b6ac078..6a2f37d 100644 | |
--- a/src/burner/libsnes/libsnes.cpp | |
+++ b/src/burner/libsnes/libsnes.cpp | |
@@ -135,7 +135,7 @@ static int archive_load_rom(uint8_t *dest, int *wrote, int i) | |
int archive = g_find_list[i].nArchive; | |
- if (ZipOpen(g_find_list_path[archive].c_str()) != 0) | |
+ if (ZipOpen((char*)g_find_list_path[archive].c_str()) != 0) | |
return 1; | |
BurnRomInfo ri = {0}; | |
@@ -185,7 +185,7 @@ static bool open_archive() | |
for (unsigned z = 0; z < g_find_list_path.size(); z++) | |
{ | |
- if (ZipOpen(g_find_list_path[z].c_str()) != 0) | |
+ if (ZipOpen((char*)g_find_list_path[z].c_str()) != 0) | |
continue; | |
ZipEntry *list = NULL; | |
-- | |
1.7.9.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment