[MPlayer-cvslog] r38079 - in trunk/gui/win32: gui.h interface.c

ib subversion at mplayerhq.hu
Fri Apr 13 12:52:22 EEST 2018


Author: ib
Date: Fri Apr 13 12:52:22 2018
New Revision: 38079

Log:
Make Win32 GUI's unix_name() globally accessible.

We will soon need it outside interface.c.

Modified:
   trunk/gui/win32/gui.h
   trunk/gui/win32/interface.c

Modified: trunk/gui/win32/gui.h
==============================================================================
--- trunk/gui/win32/gui.h	Fri Apr 13 12:42:35 2018	(r38078)
+++ trunk/gui/win32/gui.h	Fri Apr 13 12:52:22 2018	(r38079)
@@ -126,4 +126,8 @@ void display_eqwindow(gui_t *gui);
 void display_prefswindow(gui_t *gui);
 void display_opensubtitlewindow(gui_t *gui);
 
+#ifdef __WINE__
+char *unix_name(const char *win_filename);
+#endif
+
 #endif /* MPLAYER_GUI_GUI_H */

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Fri Apr 13 12:42:35 2018	(r38078)
+++ trunk/gui/win32/interface.c	Fri Apr 13 12:52:22 2018	(r38079)
@@ -101,12 +101,14 @@ mixer_t *mixer = NULL;
  *
  * @return converted file path string
  */
-static char *unix_name (char *win_filename)
+char *unix_name (const char *win_filename)
 {
     static char *unix_filename;
     LPSTR (*CDECL wine_get_unix_file_name_ptr)(LPCWSTR);
     int wchar_conv;
 
+    setdup(&unix_filename, win_filename);
+
     if (*win_filename && (win_filename[1] == ':'))
     {
         wine_get_unix_file_name_ptr = (void *) GetProcAddress(GetModuleHandleA("KERNEL32"), "wine_get_unix_file_name");
@@ -121,13 +123,12 @@ static char *unix_name (char *win_filena
             MultiByteToWideChar(CP_UNIXCP, 0, win_filename, -1, ntpath, wchar_conv);
             unix_name = wine_get_unix_file_name_ptr(ntpath);
             setdup(&unix_filename, unix_name);
-            win_filename = unix_filename;
             HeapFree(GetProcessHeap(), 0, unix_name);
             HeapFree(GetProcessHeap(), 0, ntpath);
         }
     }
 
-    return win_filename;
+    return unix_filename;
 }
 
 #if defined(CONFIG_CDDA) || defined(CONFIG_DVDREAD)


More information about the MPlayer-cvslog mailing list