diff options
-rw-r--r-- | Makefile.libretro | 4 | ||||
-rw-r--r-- | frontend/libretro.c | 5 | ||||
-rw-r--r-- | jni/Android.mk | 5 |
3 files changed, 13 insertions, 1 deletions
diff --git a/Makefile.libretro b/Makefile.libretro index a7fa0eb..df1cec2 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -22,6 +22,10 @@ CC_AS ?= $(CC) CFLAGS ?= TARGET_NAME := pcsx_rearmed +GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" +ifneq ($(GIT_VERSION)," unknown") + CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" +endif LIBZ := -lz LIBPTHREAD := -lpthread LIBDL := -ldl diff --git a/frontend/libretro.c b/frontend/libretro.c index 44cb974..589f07c 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -638,7 +638,10 @@ void retro_get_system_info(struct retro_system_info *info) { memset(info, 0, sizeof(*info)); info->library_name = "PCSX-ReARMed"; - info->library_version = "r22"; +#ifndef GIT_VERSION +#define GIT_VERSION "" +#endif + info->library_version = "r22" GIT_VERSION; info->valid_extensions = "bin|cue|img|mdf|pbp|toc|cbn|m3u"; info->need_fullpath = true; } diff --git a/jni/Android.mk b/jni/Android.mk index 43a98da..9dd9e39 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -2,6 +2,11 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) +GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" +ifneq ($(GIT_VERSION)," unknown") + LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" +endif + APP_DIR := ../../src #fix stupid change in ndk r11 that breaks compiling even when the exe would run fine |