Skip to content

Commit

Permalink
Add JNI solution files
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Feb 23, 2016
1 parent eef70dc commit 5dcaf53
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ include Makefile.common

DEFS += -ffast-math $(fpic) $(PLATFORM_DEFINES) $(ZLIB_INCLUDE) $(GCC_DEFINES) $(INCFLAGS)
# combine the various definitions to one
CDEFS += -DGP2X -DALIGN_INTS -DALIGN_SHORTS -DINLINE="static __inline" $(X86_DEFINES) -DMAME_UNDERCLOCK -DMAME_FASTSOUND -DENABLE_AUTOFIRE -DBIGCASE -D__LIBRETRO__ $(ENDIANNESS_DEFINES)$(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS)

CDEFS += $(ENDIANNESS_DEFINES)$(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS)

OBJECTS := $(SOURCES_C:.c=.o) $(SOURCES_ASM:.s=.o)

Expand Down
1 change: 1 addition & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SOURCES_C :=
CPUS :=
SOUNDS :=

DEFS := -DGP2X -DALIGN_INTS -DALIGN_SHORTS -DINLINE="static __inline" $(X86_DEFINES) -DMAME_UNDERCLOCK -DMAME_FASTSOUND -DENABLE_AUTOFIRE -DBIGCASE -D__LIBRETRO__
INCFLAGS := -I$(CORE_DIR)/src -I$(CORE_DIR)/src/libretro -I$(CORE_DIR)/src/libretro/libretro-common/include

# uncomment the following lines to include a CPU core
Expand Down
35 changes: 35 additions & 0 deletions jni/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := retro

ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -DANDROID_ARM
LOCAL_ARM_MODE := arm
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_CFLAGS += -D__ARM_NEON__ -mfpu=neon
endif
endif

ifeq ($(TARGET_ARCH),x86)
LOCAL_CFLAGS += -DANDROID_X86
endif

ifeq ($(TARGET_ARCH),mips)
LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
endif

CORE_ROOT_DIR := ..
CORE_DIR := $(CORE_ROOT_DIR)

include $(CORE_ROOT_DIR)/Makefile.common

LOCAL_SRC_FILES += $(SOURCES_C)

LOCAL_C_INCLUDES = $(INCFLAGS)

LOCAL_CFLAGS += $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS) $(ASMDEFS) $(DBGDEFS)
LOCAL_CFLAGS += -O3 -std=gnu99 -ffast-math -funroll-loops -Dstricmp=strcasecmp -DANDROID $(INCFLAGS)

include $(BUILD_SHARED_LIBRARY)
1 change: 1 addition & 0 deletions jni/Application.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_ABI := all
6 changes: 3 additions & 3 deletions src/usrintrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1828,9 +1828,9 @@ static int settraksettings(struct osd_bitmap *bitmap,int selected)
case 1:
strcat (label[i], ui_getstring (UI_reverse));
if (reverse)
sprintf(setting[i],ui_getstring (UI_on));
sprintf(setting[i],"%s", ui_getstring (UI_on));
else
sprintf(setting[i],ui_getstring (UI_off));
sprintf(setting[i],"%s", ui_getstring (UI_off));
if (i == sel) arrowize = 3;
break;
case 2:
Expand Down Expand Up @@ -2025,7 +2025,7 @@ int showcopyright(struct osd_bitmap *bitmap)

strcpy (buf, ui_getstring(UI_copyright1));
strcat (buf, "\n\n");
sprintf(buf2, ui_getstring(UI_copyright2), Machine->gamedrv->description);
sprintf(buf2, "%s%s", ui_getstring(UI_copyright2), Machine->gamedrv->description);
strcat (buf, buf2);
strcat (buf, "\n\n");
strcat (buf, ui_getstring(UI_copyright3));
Expand Down

0 comments on commit 5dcaf53

Please sign in to comment.