summaryrefslogtreecommitdiffstats
path: root/path.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-04-29 07:16:09 +0200
committerwm4 <wm4@mplayer2.org>2012-04-29 10:01:28 +0200
commit97ac824124fc5cdfbd9ac74156b79c098bce09c6 (patch)
tree2c924403e2fb619ec57ee0933cd12d32ef1bb62a /path.c
parent87f4cafe9c0881743d1117c2e8cd7e3376e33302 (diff)
parentf64a4e9931428de0f308f6ed0a0144edb8ce9619 (diff)
downloadmpv-97ac824124fc5cdfbd9ac74156b79c098bce09c6.tar.bz2
mpv-97ac824124fc5cdfbd9ac74156b79c098bce09c6.tar.xz
Merge remote-tracking branch 'origin/master'
Conflicts: bstr.c bstr.h libvo/cocoa_common.m libvo/gl_common.c libvo/video_out.c mplayer.c screenshot.c sub/subassconvert.c Merge of cocoa_common.m done by pigoz. Picking my version of screenshot.c. The fix in commit aadf1002f8a will be redone in a follow-up commit, as the original commit causes too many conflicts with the work done locally in this branch, and other work in progress.
Diffstat (limited to 'path.c')
-rw-r--r--path.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/path.c b/path.c
index 785c48eec9..e51c4c9c34 100644
--- a/path.c
+++ b/path.c
@@ -56,6 +56,9 @@ char *get_path(const char *filename){
#else
static char *config_dir = "/.mplayer";
#endif
+#if defined(__MINGW32__) || defined(__CYGWIN__)
+ char exedir[260];
+#endif
int len;
#ifdef CONFIG_MACOSX_BUNDLE
struct stat dummy;
@@ -73,9 +76,8 @@ char *get_path(const char *filename){
/* Hack to get fonts etc. loaded outside of Cygwin environment. */
{
int i,imax=0;
- char exedir[260];
- GetModuleFileNameA(NULL, exedir, 260);
- for (i=0; i< strlen(exedir); i++)
+ len = (int)GetModuleFileNameA(NULL, exedir, 260);
+ for (i=0; i < len; i++)
if (exedir[i] =='\\')
{exedir[i]='/'; imax=i;}
exedir[imax]='\0';