diff get_path.c @ 30846:72ae3dd3aa6e

Replace separate Win32, XAnim and Real codec directories by one global dir. Nowadays MPlayer does not use the codecs from other installed programs. A runtime setting will soon take over the rare case that binary codecs should be searched for in non-standard directories.
author diego
date Sun, 14 Mar 2010 16:13:32 +0000
parents 0bb5a351cdd7
children 88e57c2b3f58
line wrap: on
line diff
--- a/get_path.c	Sat Mar 13 22:46:58 2010 +0000
+++ b/get_path.c	Sun Mar 14 16:13:32 2010 +0000
@@ -161,31 +161,17 @@
 	/*make our codec dirs available for LoadLibraryA()*/
 	char tmppath[MAX_PATH*2 + 1];
 	char win32path[MAX_PATH];
-	char realpath[MAX_PATH];
 #ifdef __CYGWIN__
-	cygwin_conv_to_full_win32_path(WIN32_PATH,win32path);
+	cygwin_conv_to_full_win32_path(BINARY_CODECS_PATH, win32path);
 	strcpy(tmppath,win32path);
-#ifdef CONFIG_REALCODECS
-	cygwin_conv_to_full_win32_path(REALCODEC_PATH,realpath);
-	sprintf(tmppath,"%s;%s",win32path,realpath);
-#endif /*CONFIG_REALCODECS*/
 #else /*__CYGWIN__*/
 	/* Expand to absolute path unless it's already absolute */
-	if (!strstr(WIN32_PATH,":") && WIN32_PATH[0] != '\\'){
+	if (!strstr(BINARY_CODECS_PATH,":") && BINARY_CODECS_PATH[0] != '\\') {
 		GetModuleFileNameA(NULL, win32path, MAX_PATH);
-		strcpy(strrchr(win32path, '\\') + 1, WIN32_PATH);
+		strcpy(strrchr(win32path, '\\') + 1, BINARY_CODECS_PATH);
 	}
-	else strcpy(win32path,WIN32_PATH);
+	else strcpy(win32path, BINARY_CODECS_PATH);
 	strcpy(tmppath,win32path);
-#ifdef CONFIG_REALCODECS
-	/* Expand to absolute path unless it's already absolute */
-	if (!strstr(REALCODEC_PATH,":") && REALCODEC_PATH[0] != '\\'){
-		GetModuleFileNameA(NULL, realpath, MAX_PATH);
-		strcpy(strrchr(realpath, '\\') + 1, REALCODEC_PATH);
-	}
-	else strcpy(realpath,REALCODEC_PATH);
-	sprintf(tmppath,"%s;%s",win32path,realpath);
-#endif /*CONFIG_REALCODECS*/
 #endif /*__CYGWIN__*/
 	mp_msg(MSGT_WIN32, MSGL_V,"Setting PATH to %s\n",tmppath);
 	if (!SetEnvironmentVariableA("PATH", tmppath))