aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortwinaphex2021-06-04 22:37:50 +0200
committertwinaphex2021-06-04 22:37:50 +0200
commita17e300a2277f4a890320ce12c82917f68165a83 (patch)
treee54b414939ab0cbdf7ab3bc870270b2bdd463273
parent21df2cef5be2e3865f2826072ab3ef979e0eda1e (diff)
downloadsnes9x2005-a17e300a2277f4a890320ce12c82917f68165a83.tar.gz
snes9x2005-a17e300a2277f4a890320ce12c82917f68165a83.tar.bz2
snes9x2005-a17e300a2277f4a890320ce12c82917f68165a83.zip
Rename LOAD_FROM_MEMORY_TEST to LOAD_FROM_MEMORY
-rw-r--r--Makefile6
-rw-r--r--Makefile.common4
-rw-r--r--jni/Android.mk2
-rw-r--r--libretro.c4
-rw-r--r--source/memmap.c7
-rw-r--r--source/memmap.h2
6 files changed, 12 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index e00f108..b293853 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
DEBUG = 0
PERF_TEST = 0
-LOAD_FROM_MEMORY_TEST = 1
+LOAD_FROM_MEMORY = 1
USE_BLARGG_APU ?= 0
LAGFIX = 1
USE_OLD_COLOUR_OPS = 0
@@ -211,7 +211,7 @@ else ifeq ($(platform), psp1)
CXX = psp-g++$(EXE_EXT)
AR = psp-ar$(EXE_EXT)
STATIC_LINKING = 1
- LOAD_FROM_MEMORY_TEST = 0
+ LOAD_FROM_MEMORY = 0
FLAGS += -G0
CFLAGS += \
-march=allegrex -mno-abicalls -fno-pic \
@@ -226,7 +226,7 @@ else ifeq ($(platform), vita)
CXX = arm-vita-eabi-g++$(EXE_EXT)
AR = arm-vita-eabi-ar$(EXE_EXT)
STATIC_LINKING = 1
- LOAD_FROM_MEMORY_TEST = 0
+ LOAD_FROM_MEMORY = 0
DEFS += -DVITA
STATIC_LINKING := 1
# CTR (3DS)
diff --git a/Makefile.common b/Makefile.common
index 3247d4b..f122bce 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -48,8 +48,8 @@ else
$(CORE_DIR)/spc700.c
endif
-ifeq ($(LOAD_FROM_MEMORY_TEST),1)
- FLAGS += -DLOAD_FROM_MEMORY_TEST
+ifeq ($(LOAD_FROM_MEMORY),1)
+ FLAGS += -DLOAD_FROM_MEMORY
endif
ifeq ($(USE_OLD_COLOUR_OPS),1)
diff --git a/jni/Android.mk b/jni/Android.mk
index e5cf6e3..7c9b974 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -4,7 +4,7 @@ ROOT_DIR := $(LOCAL_PATH)/..
CORE_DIR := $(ROOT_DIR)/source
LIBRETRO_DIR := $(ROOT_DIR)
-LOAD_FROM_MEMORY_TEST := 1
+LOAD_FROM_MEMORY := 1
FLAGS :=
include $(ROOT_DIR)/Makefile.common
diff --git a/libretro.c b/libretro.c
index b29c760..2cccd7f 100644
--- a/libretro.c
+++ b/libretro.c
@@ -711,7 +711,7 @@ unsigned retro_get_region(void)
void retro_get_system_info(struct retro_system_info* info)
{
-#ifdef LOAD_FROM_MEMORY_TEST
+#ifdef LOAD_FROM_MEMORY
info->need_fullpath = false;
#else
info->need_fullpath = true;
@@ -1025,7 +1025,7 @@ bool retro_load_game(const struct retro_game_info* game)
init_descriptors();
check_variables(true);
-#ifdef LOAD_FROM_MEMORY_TEST
+#ifdef LOAD_FROM_MEMORY
if (!LoadROM(game))
#else
if (!LoadROM(game->path))
diff --git a/source/memmap.c b/source/memmap.c
index 98dd0c3..da04eb4 100644
--- a/source/memmap.c
+++ b/source/memmap.c
@@ -349,8 +349,7 @@ void S9xDeinitMemory(void)
}
}
-#ifndef LOAD_FROM_MEMORY_TEST
-
+#ifndef LOAD_FROM_MEMORY
/* Read variable size MSB int from a file */
static int32_t ReadInt(FILE* f, uint32_t nbytes)
{
@@ -564,7 +563,7 @@ static uint32_t FileLoader(uint8_t* buffer, const char* filename, int32_t maxsiz
/**********************************************************************************************/
bool LoadROM(
-#ifdef LOAD_FROM_MEMORY_TEST
+#ifdef LOAD_FROM_MEMORY
const struct retro_game_info* game
#else
const char* filename
@@ -589,7 +588,7 @@ bool LoadROM(
retry_count = 0;
again:
-#ifdef LOAD_FROM_MEMORY_TEST
+#ifdef LOAD_FROM_MEMORY
strncpy(Memory.ROMFilename, game->path, sizeof(Memory.ROMFilename));
Memory.HeaderCount = 0;
diff --git a/source/memmap.h b/source/memmap.h
index a17a207..5afc18d 100644
--- a/source/memmap.h
+++ b/source/memmap.h
@@ -33,7 +33,7 @@
#define BIGFIRST 2
#define SMALLFIRST 3
-#ifdef LOAD_FROM_MEMORY_TEST
+#ifdef LOAD_FROM_MEMORY
bool LoadROM(const struct retro_game_info* game);
#else
bool LoadROM(const char*);