[vlc] Re: Open DVD dialog box [VLC 0.53, WIN32]

Sigmund Augdal sigmunau at stud.ntnu.no
Fri May 2 16:06:52 CEST 2003


On Wed, Apr 30, 2003 at 07:40:29AM +0200, Eric Nicolas wrote:
> (I'm using the Win32 interface, this may be different with other GUIs):
> 
> I noticed a few annoying things about the open disk dialog box:
> - The "Device name" should auto detect the first CD/DVD drive, or at 
> least be a drop down.
> -  When the device name is changed and you restart VLC, this setting is 
> lost, you have to type in the device name again
You can set the default device in the preferences dialog. In the input tab
(iirc).

> 
> I may be able to do the change myself, just point me to the appropriate 
> file(s) in the source code...
the file in question is modules/gui/win32/disc.cpp but if you plan to do
some changes you should consider doing them in the wxwindows interface, as
this probably will be the default in the future. In that case the file
whould be modules/interface/wxwindows/open.cpp

Sigmund
>  string lowlevel_drive::autodetect() {
>    CHAR   szVtsFilePath[MAX_PATH];
>    TCHAR  szLastDrive[] = "C:\\";
>    HANDLE hFile;
> 
>    // Scan all possible windows drives (A: to Z:)
>    for(szLastDrive[0] = 'C'; szLastDrive[0] != 'Z'; ++szLastDrive[0]) {
> 
>      // Is this a CDROM/DVDROM drive ?
>      if (GetDriveType(szLastDrive) == DRIVE_CDROM) {
> 
>        // Test for the existence of the VTS
>        wsprintf(szVtsFilePath, "%c:\\VIDEO_TS\\VIDEO_TS.IFO", 
> szLastDrive[0]);
>        hFile = CreateFile(
>          szVtsFilePath,          // pointer to name of the file
>          GENERIC_READ,           // access (read-write) mode
>          FILE_SHARE_READ,        // share mode
>          0,                      // pointer to security attributes
>          OPEN_EXISTING,          // how to create
>          0,                      // file attributes
>          0);                     // handle to file with attributes to copy
> 
>        if (hFile != INVALID_HANDLE_VALUE) {
>          // Ok, found it !
>          CloseHandle(hFile);
>          return szLastDrive;
>        }
>      }
>    }
>    throw runtime_error("Could not find a DVD in any drive (checked C: - 
> Z:)");
>  }
> 
> 
> -- 
> This is the vlc mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://www.videolan.org/support/lists.html
> If you are in trouble, please contact <postmaster at videolan.org>
-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc mailing list