[MPlayer-cvslog] r38085 - trunk/gui/win32/dialogs.c

ib subversion at mplayerhq.hu
Fri Apr 13 13:44:31 EEST 2018


Author: ib
Date: Fri Apr 13 13:44:31 2018
New Revision: 38085

Log:
Convert subtitle file name in the Win32 GUI Wine build.

The Windows style subtitle file name needs to be converted,
so that it can be found in the Linux filesystem.

Modified:
   trunk/gui/win32/dialogs.c

Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c	Fri Apr 13 13:40:13 2018	(r38084)
+++ trunk/gui/win32/dialogs.c	Fri Apr 13 13:44:31 2018	(r38085)
@@ -73,6 +73,13 @@ void mplayerLoadSubtitle(const char *nam
 
     if (name)
     {
+#ifdef __WINE__
+        // When the GUI receives the subtitle file name from the open dialog
+        // box it's in Windows style (C:\path\to\file), which needs to be
+        // converted for MPlayer, so that it will find the filename in the
+        // Linux filesystem.
+        name = unix_name(name);
+#endif
         mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_LoadingSubtitle, name);
         subdata = sub_read_file(name, (guiInfo.sh_video ? guiInfo.sh_video->fps : 0));
         if (!subdata)


More information about the MPlayer-cvslog mailing list