From 8315dbb2172cf95729268edb0f4a9a19cce4e42f Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Fri, 18 May 2018 16:03:25 +0800 Subject: [PATCH 1/2] use -lpng instead of -lpng12 --- configure.ac | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index bcbec7c1..2d01a37b 100644 --- a/configure.ac +++ b/configure.ac @@ -1958,7 +1958,7 @@ dnl Check for FreeType1 library ft2) dnl Check for FreeType2 library AC_CHECK_LIB(freetype, FT_Library_Version, - DEP_LIBS="$DEP_LIBS -lfreetype -lz -lpng12", + DEP_LIBS="$DEP_LIBS -lfreetype", use_ttf_lib="none") ;; esac @@ -2041,7 +2041,6 @@ case "$use_ttf_lib" in FT1_INC_DIR="-I$with_ft1_includes" fi - DEP_LIBS="$DEP_LIBS -lttf" AC_SUBST(FT1_INC_DIR) ;; ft2) @@ -2058,7 +2057,6 @@ case "$use_ttf_lib" in FT2_INC_DIR="-I$with_ft2_includes" fi - DEP_LIBS="$DEP_LIBS -lfreetype" AC_SUBST(FT2_INC_DIR) ;; esac From 6388d8049f43d0bbd247236d36cee74df1d00bc3 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Fri, 18 May 2018 16:03:45 +0800 Subject: [PATCH 2/2] add a new function: GetResPath --- include/window.h | 15 +++++++++++++++ src/sysres/resmgr.c | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/include/window.h b/include/window.h index 4a0f0f94..d19d6564 100644 --- a/include/window.h +++ b/include/window.h @@ -4732,6 +4732,19 @@ enum emResReturn { RES_RET_INUSED //the res or object is in used, cannot be unloaded }; +/** + * \fn const char* GetResPath (void) + * \brief Get the currrent user's resource path. + * + * \param path The path which store the resources. It can be an absolute path or relative path. + * + * \return the user's resource path; NULL if have not been set. + * + * \sa SetResPath + * + **/ +MG_EXPORT const char* GetResPath (void); + /** * \fn int SetResPath (const char* path); * \brief Set user's resource path into the search paths of resource manager. @@ -4742,6 +4755,8 @@ enum emResReturn { * * \return RES_RET_OK for success or error code. * + * \sa GetResPath + * **/ MG_EXPORT int SetResPath (const char* path); diff --git a/src/sysres/resmgr.c b/src/sysres/resmgr.c index 94bd9a82..dde2c029 100644 --- a/src/sysres/resmgr.c +++ b/src/sysres/resmgr.c @@ -498,6 +498,11 @@ int AddResPath(const char* paths) #endif +const char* GetResPath (void) +{ + return usr_res_path; +} + int SetResPath(const char* path) { if(path == NULL) {