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

vayne subversion at mplayerhq.hu
Sun Apr 29 00:09:01 CEST 2007


Author: vayne
Date: Sun Apr 29 00:09:01 2007
New Revision: 23165

Log:
compilation fix for disabling dvd functionality, patch by <bangbangbear at gmail dot com>, slightly modified by me.

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

Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c	(original)
+++ trunk/gui/win32/gui.c	Sun Apr 29 00:09:01 2007
@@ -1005,29 +1005,27 @@ static LRESULT CALLBACK EventProc(HWND h
                     {
                         if(LOWORD(wParam) - IDPLAYDISK == cdromdrive)
                         {
-#ifdef USE_DVDREAD
                             sprintf(searchpath, "%sVIDEO_TS", device + pos);
                             if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                             {
+#ifdef USE_DVDREAD
                                 if (dvd_device) free(dvd_device);
                                 dvd_device = strdup(device + pos);
                                 dvd_title = dvd_chapter = dvd_angle = 1;
                                 handlemsg(hWnd, evPlayDVD);
-                            }
 #endif
-#ifdef HAVE_LIBCDIO
+                            }
                             sprintf(searchpath, "%sTrack01.cda", device + pos);
                             if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                             {
+#ifdef HAVE_LIBCDIO
                                 if (cdrom_device) free(cdrom_device);
                                 cdrom_device = strdup(device + pos);
                                 /* mplayer doesn't seem to like the trailing \ after the device name */
                                 cdrom_device[2]=0;
                                 handlemsg(hWnd, evPlayCD);
-                            }
 #endif
-                            else
-                            {
+                            } else {
                                 HANDLE searchhndl;
                                 WIN32_FIND_DATA finddata;
                                 sprintf(searchpath, "%smpegav\\*.dat", device + pos);

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	(original)
+++ trunk/gui/win32/interface.c	Sun Apr 29 00:09:01 2007
@@ -271,6 +271,7 @@ static void guiSetEvent(int event)
         {
             switch(guiIntfStruct.StreamType)
             {
+#ifdef USE_DVDREAD
                 case STREAMTYPE_DVD:
                 {
                     guiIntfStruct.Title = guiIntfStruct.DVD.current_title;
@@ -280,6 +281,7 @@ static void guiSetEvent(int event)
                     guiGetEvent(guiCEvent, (void *) guiSetPlay);
                     break;
                 }
+#endif
                 default:
                 {
                     guiIntfStruct.FilenameChanged = guiIntfStruct.NewPlay = 1;



More information about the MPlayer-cvslog mailing list