changeset 34454:5a45efc630b8

Remove all unnecessary #ifdefs from GUI code. Move or add necessary ones.
author ib
date Thu, 12 Jan 2012 10:08:25 +0000
parents ad3519665533
children 00cf27b14c15
files gui/cfg.c gui/interface.c gui/interface.h gui/ui/actions.c gui/ui/gtk/menu.c gui/ui/gtk/preferences.c gui/ui/main.c gui/ui/render.c gui/util/string.c gui/win32/dialogs.c gui/win32/gui.c gui/win32/interface.c gui/win32/widgetrender.c gui/wm/ws.c
diffstat 14 files changed, 15 insertions(+), 138 deletions(-) [+]
line wrap: on
line diff
--- a/gui/cfg.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/cfg.c	Thu Jan 12 10:08:25 2012 +0000
@@ -47,10 +47,8 @@
 
 int gtkVfPP;
 
-#ifdef CONFIG_DXR3
 int gtkVfLAVC;
 char *gtkDXR3Device;
-#endif
 
 int gtkAutoSyncOn;
 int gtkAutoSync;
@@ -60,25 +58,17 @@
 int gtkAOExtraStereo;
 float gtkAOExtraStereoMul = 1.0f;
 
-#ifdef CONFIG_ALSA
 char *gtkAOALSAMixer;
 char *gtkAOALSAMixerChannel;
 char *gtkAOALSADevice;
-#endif
 
-#ifdef CONFIG_OSS_AUDIO
 char *gtkAOOSSMixer;
 char *gtkAOOSSMixerChannel;
 char *gtkAOOSSDevice;
-#endif
 
-#ifdef CONFIG_ESD
 char *gtkAOESDDevice;
-#endif
 
-#ifdef CONFIG_SDL
 char *gtkAOSDLDriver;
-#endif
 
 int gtkEnableAudioEqualizer;
 float gtkEquChannels[6][10];
@@ -86,9 +76,7 @@
 int gtkSubDumpMPSub;
 int gtkSubDumpSrt;
 
-#ifdef CONFIG_ASS
 gtkASS_t gtkASS;
-#endif
 
 int gtkEnablePlayBar = 1;
 int gtkLoadFullscreen;
--- a/gui/interface.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/interface.c	Thu Jan 12 10:08:25 2012 +0000
@@ -75,11 +75,8 @@
         cdrom_device = strdup(DEFAULT_CDROM_DEVICE);
     if (!dvd_device)
         dvd_device = strdup(DEFAULT_DVD_DEVICE);
-
-#ifdef CONFIG_DXR3
     if (!gtkDXR3Device)
         gtkDXR3Device = strdup("/dev/em8300-0");
-#endif
 
     if (stream_cache_size > 0) {
         gtkCacheOn   = 1;
@@ -92,12 +89,10 @@
         gtkAutoSync   = autosync;
     }
 
-#ifdef CONFIG_ASS
     gtkASS.enabled       = ass_enabled;
     gtkASS.use_margins   = ass_use_margins;
     gtkASS.top_margin    = ass_top_margin;
     gtkASS.bottom_margin = ass_bottom_margin;
-#endif
 
     gtkInit();
 
@@ -263,12 +258,10 @@
             gui_sub_pos_y  = guiApp.sub.y;
         }
 
-#ifdef CONFIG_ASS
         ass_enabled       = gtkASS.enabled;
         ass_use_margins   = gtkASS.use_margins;
         ass_top_margin    = gtkASS.top_margin;
         ass_bottom_margin = gtkASS.bottom_margin;
-#endif
 
         cfg_write();
         wsXDone();
@@ -415,7 +408,6 @@
         case STREAMTYPE_STREAM:
             break;
 
-#ifdef CONFIG_CDDA
         case STREAMTYPE_CDDA:
         {
             char tmp[512];
@@ -424,9 +416,7 @@
             uiSetFileName(NULL, tmp, SAME_STREAMTYPE);
         }
         break;
-#endif
 
-#ifdef CONFIG_VCD
         case STREAMTYPE_VCD:
         {
             char tmp[512];
@@ -435,9 +425,7 @@
             uiSetFileName(NULL, tmp, SAME_STREAMTYPE);
         }
         break;
-#endif
 
-#ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
         {
             char tmp[512];
@@ -450,7 +438,6 @@
             dvd_angle   = guiInfo.Angle;
 
             break;
-#endif
         }
 
         // video opts
@@ -486,12 +473,10 @@
             }
         }
 
-#ifdef CONFIG_DXR3
         if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3"))
             if (guiInfo.StreamType != STREAMTYPE_DVD && guiInfo.StreamType != STREAMTYPE_VCD)
                 if (gtkVfLAVC)
                     add_vf("lavc");
-#endif
 
         if (gtkVfPP)
             add_vf("pp");
@@ -515,7 +500,6 @@
             free(name);
         }
 
-#ifdef CONFIG_OSS_AUDIO
         if (audio_driver_list && !gstrncmp(audio_driver_list[0], "oss", 3)) {
             char *tmp;
 
@@ -531,9 +515,7 @@
             gaddlist(&audio_driver_list, tmp);
             free(tmp);
         }
-#endif
 
-#ifdef CONFIG_ALSA
         if (audio_driver_list && !gstrncmp(audio_driver_list[0], "alsa", 4)) {
             char *tmp;
 
@@ -549,9 +531,7 @@
             gaddlist(&audio_driver_list, tmp);
             free(tmp);
         }
-#endif
 
-#ifdef CONFIG_SDL
         if (audio_driver_list && !gstrncmp(audio_driver_list[0], "sdl", 3)) {
             char *tmp;
 
@@ -564,9 +544,7 @@
             gaddlist(&audio_driver_list, tmp);
             free(tmp);
         }
-#endif
 
-#ifdef CONFIG_ESD
         if (audio_driver_list && !gstrncmp(audio_driver_list[0], "esd", 3)) {
             char *tmp;
 
@@ -579,7 +557,6 @@
             gaddlist(&audio_driver_list, tmp);
             free(tmp);
         }
-#endif
 
         // subtitle
 
@@ -612,12 +589,10 @@
 
         guiInfo.NewPlay = 0;
 
-#ifdef CONFIG_ASS
         ass_enabled       = gtkASS.enabled;
         ass_use_margins   = gtkASS.use_margins;
         ass_top_margin    = gtkASS.top_margin;
         ass_bottom_margin = gtkASS.bottom_margin;
-#endif
 
         break;
 
@@ -631,21 +606,16 @@
         case STREAMTYPE_STREAM:
             break;
 
-#ifdef CONFIG_CDDA
         case STREAMTYPE_CDDA:
             guiInfo.Tracks = 0;
             stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks);
             break;
-#endif
 
-#ifdef CONFIG_VCD
         case STREAMTYPE_VCD:
             guiInfo.Tracks = 0;
             stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks);
             break;
-#endif
 
-#ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
             guiInfo.Tracks = 0;
             stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks);
@@ -653,16 +623,17 @@
             stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters);
             guiInfo.Angles = 0;
             stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles);
+#ifdef CONFIG_DVDREAD
             dvd = stream->priv;
             guiInfo.AudioStreams = dvd->nr_of_channels;
             memcpy(guiInfo.AudioStream, dvd->audio_streams, sizeof(dvd->audio_streams));
             guiInfo.Subtitles = dvd->nr_of_subtitles;
             memcpy(guiInfo.Subtitle, dvd->subtitles, sizeof(dvd->subtitles));
+#endif
             guiInfo.Track   = dvd_title + 1;
             guiInfo.Chapter = dvd_chapter + 1;
             guiInfo.Angle   = dvd_angle + 1;
             break;
-#endif
         }
 
         break;
@@ -686,12 +657,10 @@
         btnSet(evBackward10min, state);
         btnSet(evSetMoviePosition, state);
 
-#ifdef CONFIG_DXR3
         if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3") && (((demuxer_t *)mpctx_get_demuxer(guiInfo.mpcontext))->file_format != DEMUXER_TYPE_MPEG_PS) && !gtkVfLAVC) {
             gtkMessageBox(GTK_MB_FATAL, MSGTR_NEEDLAVC);
             return False;
         }
-#endif
 
         break;
 
@@ -799,14 +768,12 @@
             break;
         }
 
-#ifdef CONFIG_CDDA
         if (guiInfo.StreamType == STREAMTYPE_CDDA) {
             uiNext();
 
             if (guiInfo.Playing)
                 break;
         }
-#endif
 
         if (guiInfo.Playing && (next = listSet(gtkGetNextPlItem, NULL)) && (plLastPlayed != next)) {
             plLastPlayed = next;
@@ -823,11 +790,9 @@
             guiInfo.Position      = 0;
             guiInfo.AudioChannels = 0;
 
-#ifdef CONFIG_DVDREAD
             guiInfo.Track   = 1;
             guiInfo.Chapter = 1;
             guiInfo.Angle   = 1;
-#endif
 
             if (gtkShowVideoWindow) {
                 guiInfo.VideoWindow = True;
@@ -970,12 +935,11 @@
     switch (what) {
         // subtitle
 
-#ifndef CONFIG_FREETYPE
     case MPLAYER_SET_FONT_FACTOR:
         font_factor = value;
         mplayerLoadFont();
         break;
-#else
+
     case MPLAYER_SET_FONT_OUTLINE:
         subtitle_font_thickness = (8.0f / 100.0f) * value;
         mplayerLoadFont();
@@ -1006,14 +970,11 @@
         subtitle_autoscale = (int)value;
         mplayerLoadFont();
         break;
-#endif
 
-#ifdef CONFIG_ICONV
     case MPLAYER_SET_SUB_ENCODING:
         nfree(sub_cp);
         sub_cp = gstrdup((char *)data);
         break;
-#endif
 
     case MPLAYER_SET_EXTRA_STEREO:
         gtkAOExtraStereoMul = value;
--- a/gui/interface.h	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/interface.h	Thu Jan 12 10:08:25 2012 +0000
@@ -102,30 +102,22 @@
     int StreamType;
     int AudioChannels;
 
-#ifdef CONFIG_DVDREAD
     int AudioStreams;
     stream_language_t AudioStream[32];
 
     int Subtitles;
     stream_language_t Subtitle[32];
-#endif
 
     char *Filename;           // public, read access by MPlayer
     char *AudioFilename;
     char *SubtitleFilename;
 
-#if defined(CONFIG_VCD) || defined(CONFIG_DVDREAD)
     int Tracks;
-#endif
-
     int Track;                // public, read access by MPlayer
-
-#ifdef CONFIG_DVDREAD
     int Chapters;
     int Chapter;              // public, write access by MPlayer
     int Angles;
     int Angle;
-#endif
 
     int Playing;              // public, read access by MPlayer
 
--- a/gui/ui/actions.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/ui/actions.c	Thu Jan 12 10:08:25 2012 +0000
@@ -247,20 +247,10 @@
         return;
 
     switch (guiInfo.StreamType) {
-#ifdef CONFIG_CDDA
     case STREAMTYPE_CDDA:
-        break;
-#endif
-
-#ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
-        break;
-#endif
-
-#ifdef CONFIG_DVDREAD
     case STREAMTYPE_DVD:
         break;
-#endif
 
     default:
 
@@ -291,25 +281,20 @@
         return;
 
     switch (guiInfo.StreamType) {
-#ifdef CONFIG_CDDA
     case STREAMTYPE_CDDA:
         if (--guiInfo.Track == 0) {
             guiInfo.Track = 1;
             stop = 1;
         }
         break;
-#endif
 
-#ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
         if (--guiInfo.Track == 1) {
             guiInfo.Track = 2;
             stop = 1;
         }
         break;
-#endif
 
-#ifdef CONFIG_DVDREAD
     case STREAMTYPE_DVD:
 
         if (--guiInfo.Chapter == 0) {
@@ -322,7 +307,6 @@
         }
 
         break;
-#endif
 
     default:
 
@@ -354,7 +338,6 @@
         return;
 
     switch (guiInfo.StreamType) {
-#ifdef CONFIG_CDDA
     case STREAMTYPE_CDDA:
 
         if (++guiInfo.Track > guiInfo.Tracks) {
@@ -363,9 +346,7 @@
         }
 
         break;
-#endif
 
-#ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
 
         if (++guiInfo.Track >= guiInfo.Tracks) {
@@ -374,9 +355,7 @@
         }
 
         break;
-#endif
 
-#ifdef CONFIG_DVDREAD
     case STREAMTYPE_DVD:
 
         if (guiInfo.Chapter++ == guiInfo.Chapters) {
@@ -389,7 +368,6 @@
         }
 
         break;
-#endif
 
     default:
 
--- a/gui/ui/gtk/menu.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/ui/gtk/menu.c	Thu Jan 12 10:08:25 2012 +0000
@@ -207,6 +207,7 @@
  const char * name;
 } Languages_t;
 
+#ifdef CONFIG_DVDREAD
 #define lng( a,b ) ( (int)(a) * 256 + b )
 static Languages_t Languages[] =
          {
@@ -384,12 +385,10 @@
          };
 #undef lng
 
-#ifdef CONFIG_DVDREAD
 static char * ChannelTypes[] =
 	{ "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" };
 static char * ChannelNumbers[] =
 	{ "","Stereo","","","","5.1" };
-#endif
 
 static const char * GetLanguage( int language )
 {
@@ -398,6 +397,7 @@
   if ( Languages[i].id == language ) return Languages[i].name;
  return NULL;
 }
+#endif
 
 
 GtkWidget * DVDSubMenu;
--- a/gui/ui/gtk/preferences.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/ui/gtk/preferences.c	Thu Jan 12 10:08:25 2012 +0000
@@ -184,10 +184,8 @@
 static char * vo_driver[3];
 static int    old_video_driver = 0;
 
-#ifdef CONFIG_DXR3
  void ShowDXR3Config( void );
  void HideDXR3Config( void );
-#endif
  void ShowAudioConfig( void );
  void HideAudioConfig( void );
 
@@ -1474,6 +1472,7 @@
 }
 #endif
 
+#if defined(CONFIG_OSS_AUDIO) || defined(CONFIG_ALSA) || defined(CONFIG_SDL) || defined (CONFIG_ESD)
 // Gets text string from a gtk entry, interpreting
 // MSGTR_PREFERENCES_DriverDefault as null string.
 static const char *getGtkEntryText(GtkWidget *from)
@@ -1494,6 +1493,7 @@
   }
   gtk_entry_set_text(GTK_ENTRY(dest),to);
 }
+#endif
 
        GtkWidget *AudioConfig;
 static GtkWidget *CEAudioDevice;
@@ -1706,7 +1706,6 @@
   return AudioConfig;
 }
 
-#ifdef CONFIG_DXR3
 // --- dxr3 config box
 
 static GtkWidget * DXR3Config;
@@ -1826,5 +1825,3 @@
 
  return DXR3Config;
 }
-
-#endif
--- a/gui/ui/main.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/ui/main.c	Thu Jan 12 10:08:25 2012 +0000
@@ -114,11 +114,8 @@
     listSet(gtkDelPl, NULL);
   }
 
-#ifdef CONFIG_VCD
   if (what & CLEAR_VCD) guiInfo.Tracks = 0;
-#endif
 
-#ifdef CONFIG_DVDREAD
   if (what & CLEAR_DVD)
   {
     guiInfo.AudioStreams = 0;
@@ -127,7 +124,6 @@
     guiInfo.Chapters = 0;
     guiInfo.Angles = 0;
   }
-#endif
 }
 
 static unsigned last_redraw_time = 0;
@@ -228,7 +224,7 @@
 	         guiInfo.Track=1;
 	       guiInfo.NewPlay=GUI_FILE_NEW;
 	       break;
-#ifdef CONFIG_CDDA
+
           case STREAMTYPE_CDDA:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
@@ -238,8 +234,7 @@
                  guiInfo.NewPlay=GUI_FILE_SAME;
 		}
 	       break;
-#endif
-#ifdef CONFIG_VCD
+
           case STREAMTYPE_VCD:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
@@ -249,8 +244,7 @@
                  guiInfo.NewPlay=GUI_FILE_SAME;
 		}
 	       break;
-#endif
-#ifdef CONFIG_DVDREAD
+
           case STREAMTYPE_DVD:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_DVD - CLEAR_FILE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
@@ -258,7 +252,6 @@
                  guiInfo.NewPlay=GUI_FILE_SAME;
 		}
                break;
-#endif
          }
         uiPlay();
         break;
--- a/gui/ui/render.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/ui/render.c	Thu Jan 12 10:08:25 2012 +0000
@@ -206,23 +206,17 @@
                     av_strlcat(trbuf, "u", sizeof(trbuf));
                     break;
 
-#ifdef CONFIG_CDDA
                 case STREAMTYPE_CDDA:
                     av_strlcat(trbuf, "a", sizeof(trbuf));
                     break;
-#endif
 
-#ifdef CONFIG_VCD
                 case STREAMTYPE_VCD:
                     av_strlcat(trbuf, "v", sizeof(trbuf));
                     break;
-#endif
 
-#ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
                     av_strlcat(trbuf, "d", sizeof(trbuf));
                     break;
-#endif
 
                 default:
                     av_strlcat(trbuf, " ", sizeof(trbuf));
--- a/gui/util/string.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/util/string.c	Thu Jan 12 10:08:25 2012 +0000
@@ -283,26 +283,20 @@
         av_strlcpy(fname, guiInfo.Filename, maxlen);
         break;
 
-#ifdef CONFIG_CDDA
     case STREAMTYPE_CDDA:
         snprintf(fname, maxlen, MSGTR_Title, guiInfo.Track);
         break;
-#endif
 
-#ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
         snprintf(fname, maxlen, MSGTR_Title, guiInfo.Track - 1);
         break;
-#endif
 
-#ifdef CONFIG_DVDREAD
     case STREAMTYPE_DVD:
         if (guiInfo.Chapter)
             snprintf(fname, maxlen, MSGTR_Chapter, guiInfo.Chapter);
         else
             av_strlcat(fname, MSGTR_NoChapter, maxlen);
         break;
-#endif
 
     default:
         av_strlcpy(fname, MSGTR_NoMediaOpened, maxlen);
--- a/gui/win32/dialogs.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/win32/dialogs.c	Thu Jan 12 10:08:25 2012 +0000
@@ -774,7 +774,6 @@
    UpdateWindow(hWnd);
 }
 
-#ifdef CONFIG_DVDREAD
 static LRESULT CALLBACK TitleChapterWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 {
     static HWND title;
@@ -902,7 +901,6 @@
    ShowWindow(hWnd, SW_SHOW);
    UpdateWindow(hWnd);
 }
-#endif
 
 static LRESULT CALLBACK EqWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 {
--- a/gui/win32/gui.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/win32/gui.c	Thu Jan 12 10:08:25 2012 +0000
@@ -451,11 +451,9 @@
                 case ID_NTRACK:
                     handlemsg(hWnd, evNext);
                     break;
-#ifdef CONFIG_DVDREAD
                 case ID_CHAPTERSEL:
                     display_chapterselwindow(gui);
                     break;
-#endif
                 case ID_FULLSCREEN:
                     mp_input_queue_cmd(mp_input_parse_cmd("vo_fullscreen"));
                     break;
@@ -864,9 +862,11 @@
                     char menuitem[MAX_PATH];
                     int flags = MF_STRING, enable = 0;
                     mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] checking %s for CD/VCD/SVCD/DVDs\n", device + pos);
+#ifdef CONFIG_DVDREAD
                     sprintf(searchpath, "%sVIDEO_TS", device + pos);
                     if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                         enable = 1;
+#endif
                     sprintf(searchpath, "%sMpegav", device + pos);
                     if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                         enable = 1;
@@ -1045,22 +1045,18 @@
                             sprintf(searchpath, "%sVIDEO_TS", device + pos);
                             if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                             {
-#ifdef CONFIG_DVDREAD
                                 free(dvd_device);
                                 dvd_device = strdup(device + pos);
                                 handlemsg(hWnd, evPlayDVD);
-#endif
                             }
                             sprintf(searchpath, "%sTrack01.cda", device + pos);
                             if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                             {
-#ifdef CONFIG_CDDA
                                 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 {
                                 HANDLE searchhndl;
                                 WIN32_FIND_DATA finddata;
@@ -1250,8 +1246,8 @@
     AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
     AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->aspectmenu, acp(MSGTR_MENU_AspectRatio));
     AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->subtitlemenu, acp(MSGTR_MENU_Subtitles));
+#ifdef CONFIG_DVDREAD
     AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->dvdmenu, acp(MSGTR_MENU_DVD));
-#ifdef CONFIG_DVDREAD
     AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, acp(MSGTR_SelectTitleChapter));
 #endif
     AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, acp(MSGTR_MENU_SubtitlesOnOff));
--- a/gui/win32/interface.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/win32/interface.c	Thu Jan 12 10:08:25 2012 +0000
@@ -354,14 +354,12 @@
         {
             switch(guiInfo.StreamType)
             {
-#ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
                 {
                     guiInfo.NewPlay = GUI_FILE_SAME;
                     gui(GUI_SET_STATE, (void *) GUI_PLAY);
                     break;
                 }
-#endif
                 default:
                 {
                     guiInfo.NewPlay = GUI_FILE_NEW;
@@ -415,13 +413,11 @@
     if(guiInfo.Playing == GUI_PAUSE) return;
     switch(guiInfo.StreamType)
     {
-#ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
             if(guiInfo.Chapter == (guiInfo.Chapters - 1))
                 return;
             guiInfo.Chapter++;
             break;
-#endif
         default:
             if(mygui->playlist->current == (mygui->playlist->trackcount - 1))
                 return;
@@ -437,13 +433,11 @@
     if(guiInfo.Playing == GUI_PAUSE) return;
     switch(guiInfo.StreamType)
     {
-#ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
             if(guiInfo.Chapter == 1)
                 return;
             guiInfo.Chapter--;
             break;
-#endif
         default:
             if(mygui->playlist->current == 0)
                 return;
@@ -596,7 +590,6 @@
                     uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, SAME_STREAMTYPE);
                     guiInfo.Track = mygui->playlist->current + 1;
                     break;
-#ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
                 {
                     char tmp[512];
@@ -606,7 +599,6 @@
                     uiSetFileName(NULL, tmp, SAME_STREAMTYPE);
                     break;
                 }
-#endif
             }
             guiInfo.VideoWindow = 1;
             if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm");
@@ -665,7 +657,6 @@
             guiInfo.StreamType = stream->type;
             switch(stream->type)
             {
-#ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
                     guiInfo.Tracks = 0;
                     stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks);
@@ -673,16 +664,17 @@
                     stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters);
                     guiInfo.Angles = 0;
                     stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles);
+#ifdef CONFIG_DVDREAD
                     dvdp = stream->priv;
                     guiInfo.AudioStreams = dvdp->nr_of_channels;
                     memcpy(guiInfo.AudioStream, dvdp->audio_streams, sizeof(dvdp->audio_streams));
                     guiInfo.Subtitles = dvdp->nr_of_subtitles;
                     memcpy(guiInfo.Subtitle, dvdp->subtitles, sizeof(dvdp->subtitles));
+#endif
                     guiInfo.Chapter = dvd_chapter + 1;
                     guiInfo.Angle = dvd_angle + 1;
                     guiInfo.Track = dvd_title + 1;
                     break;
-#endif
             }
             break;
         }
@@ -796,11 +788,9 @@
           guiInfo.Position = 0;
           guiInfo.AudioChannels = 0;
 
-#ifdef CONFIG_DVDREAD
           guiInfo.Track = 1;
           guiInfo.Chapter = 1;
           guiInfo.Angle = 1;
-#endif
 
           if (mygui->playlist->current == (mygui->playlist->trackcount - 1))
               mygui->playlist->current = 0;
--- a/gui/win32/widgetrender.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/win32/widgetrender.c	Thu Jan 12 10:08:25 2012 +0000
@@ -163,10 +163,8 @@
 
     if(guiInfo.StreamType == 0)
         stringreplace(text, "$T", "f");
-#ifdef CONFIG_DVDREAD
     else if(guiInfo.StreamType == STREAMTYPE_DVD || guiInfo.StreamType == STREAMTYPE_DVDNAV)
         stringreplace(text, "$T", "d");
-#endif
     else stringreplace(text, "$T", "u");
 
     stringreplace(text, "$f", acp(TranslateFilename(1, tmp, sizeof(tmp))));
--- a/gui/wm/ws.c	Thu Jan 12 10:07:22 2012 +0000
+++ b/gui/wm/ws.c	Thu Jan 12 10:08:25 2012 +0000
@@ -325,7 +325,6 @@
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws]  green mask: 0x%x\n", wsGreenMask);
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws]  blue mask: 0x%x\n", wsBlueMask);
 
-#ifdef MP_DEBUG
     if (wsUseXShm) {
         int minor, major, shp;
 
@@ -341,7 +340,6 @@
         mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] XShape version is %d.%d\n", major, minor);
     }
 #endif
-#endif
 
     wsOutMask = wsGetOutMask();