summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorvayne <vayne@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-28 22:09:01 +0000
committervayne <vayne@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-28 22:09:01 +0000
commit9d9952500eb40d7e2f02503afca1d3879f713a0f (patch)
treeb0eefc383e164aa932db0100ddd85969d636df3c /gui
parentcd9d03176f9e0d29387f3267e3503e61048ea28a (diff)
downloadmpv-9d9952500eb40d7e2f02503afca1d3879f713a0f.tar.bz2
mpv-9d9952500eb40d7e2f02503afca1d3879f713a0f.tar.xz
compilation fix for disabling dvd functionality, patch by <bangbangbear at gmail dot com>, slightly modified by me.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23165 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'gui')
-rw-r--r--gui/win32/gui.c10
-rw-r--r--gui/win32/interface.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/gui/win32/gui.c b/gui/win32/gui.c
index 06aee87b1e..428a24dfcc 100644
--- a/gui/win32/gui.c
+++ b/gui/win32/gui.c
@@ -1005,29 +1005,27 @@ static LRESULT CALLBACK EventProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
{
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);
diff --git a/gui/win32/interface.c b/gui/win32/interface.c
index cd67a1973d..4be98e52ea 100644
--- a/gui/win32/interface.c
+++ b/gui/win32/interface.c
@@ -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;