]> git.sesse.net Git - vlc/commitdiff
Win32: better eject code for UNICODE-APIs
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 15 Jan 2013 10:29:39 +0000 (11:29 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 15 Jan 2013 10:29:39 +0000 (11:29 +0100)
modules/gui/eject.c

index 03277e3fcd878467825d2fb0c455465b3cf96782..5fae5ac7c9af6bf5c30b63c834a7561c66a40858 100644 (file)
@@ -126,14 +126,14 @@ static int intf_Eject( vlc_object_t *p_this, const char *psz_device )
 #if defined(WIN32)
     MCI_OPEN_PARMS op;
     DWORD i_flags;
-    char psz_drive[4];
+    TCHAR psz_drive[4];
 
     memset( &op, 0, sizeof(MCI_OPEN_PARMS) );
     op.lpstrDeviceType = (LPCTSTR)MCI_DEVTYPE_CD_AUDIO;
 
-    strcpy( psz_drive, "X:" );
+    _tcscpy( psz_drive, TEXT("X:") );
     psz_drive[0] = psz_device[0];
-    op.lpstrElementName = ToT(psz_drive);
+    op.lpstrElementName = psz_drive;
 
     /* Set the flags for the device type */
     i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID |