changeset 34403:bca629bb50cf

Initialize device options in guiInit(). Don't do that just before playback starts.
author ib
date Mon, 02 Jan 2012 16:48:18 +0000
parents ec0ebcb1bd30
children 95f802285711
files gui/interface.c gui/ui/main.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Mon Jan 02 16:25:00 2012 +0000
+++ b/gui/interface.c	Mon Jan 02 16:48:18 2012 +0000
@@ -71,6 +71,11 @@
 
     mp_msg(MSGT_GPLAYER, MSGL_V, "GUI init.\n");
 
+    if (!cdrom_device)
+        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");
--- a/gui/ui/main.c	Mon Jan 02 16:25:00 2012 +0000
+++ b/gui/ui/main.c	Mon Jan 02 16:48:18 2012 +0000
@@ -213,7 +213,6 @@
 #ifdef CONFIG_CDDA
           case STREAMTYPE_CDDA:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE );
-	       if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
 	        {
 		 if ( !guiInfo.Track )
@@ -225,7 +224,6 @@
 #ifdef CONFIG_VCD
           case STREAMTYPE_VCD:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE );
-	       if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
 	        {
 		 if ( !guiInfo.Track )
@@ -237,7 +235,6 @@
 #ifdef CONFIG_DVDREAD
           case STREAMTYPE_DVD:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_DVD - CLEAR_FILE );
-	       if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
 	        {
                  guiInfo.NewPlay=GUI_FILE_SAME;