diff --git a/Projects/Android/jni/OpenJK/shared/sys/sys_main.cpp b/Projects/Android/jni/OpenJK/shared/sys/sys_main.cpp
index b5ea6d3..a1b32dc 100644
--- a/Projects/Android/jni/OpenJK/shared/sys/sys_main.cpp
+++ b/Projects/Android/jni/OpenJK/shared/sys/sys_main.cpp
@@ -646,7 +646,10 @@ void *Sys_LoadGameDll( const char *name, GetModuleAPIProc **moduleAPI )
char *apppath = Cvar_VariableString( "fs_apppath" );
#endif
+ const char* current_dir = Sys_CurrentDirname();
+
const char *searchPaths[] = {
+ current_dir,
homepath,
#ifdef MACOS_X
apppath,
diff --git a/Projects/Android/jni/OpenJK/shared/sys/sys_public.h b/Projects/Android/jni/OpenJK/shared/sys/sys_public.h
index bad8218..9d7a8bd 100644
--- a/Projects/Android/jni/OpenJK/shared/sys/sys_public.h
+++ b/Projects/Android/jni/OpenJK/shared/sys/sys_public.h
@@ -143,6 +143,7 @@ char *Sys_DefaultAppPath(void);
char *Sys_DefaultHomePath(void);
const char *Sys_Dirname( char *path );
const char *Sys_Basename( char *path );
+const char * Sys_CurrentDirname();
bool Sys_PathCmp( const char *path1, const char *path2 );
diff --git a/Projects/Android/jni/OpenJK/shared/sys/sys_win32.cpp b/Projects/Android/jni/OpenJK/shared/sys/sys_win32.cpp
index 5b6c234..92d3943 100644
--- a/Projects/Android/jni/OpenJK/shared/sys/sys_win32.cpp
+++ b/Projects/Android/jni/OpenJK/shared/sys/sys_win32.cpp
@@ -25,6 +25,7 @@ along with this program; if not, see .
#include
#include
#include
+#include
#define MEM_THRESHOLD (128*1024*1024)
@@ -84,6 +85,28 @@ const char *Sys_Dirname( char *path )
return dir;
}
+/*
+==============
+Sys_Dirname
+==============
+*/
+const char *Sys_CurrentDirname( )
+{
+ static char dir[ MAX_OSPATH ] = { 0 };
+
+ GetCurrentDirectory(
+ MAX_OSPATH,
+ dir
+ );
+
+ while( length > 0 && dir[ length ] != '\\' )
+ length--;
+
+ dir[ length ] = '\0';
+
+ return dir;
+}
+
/*
================
Sys_Milliseconds