Commit 5d06ca53 authored by Damien Fouilleul's avatar Damien Fouilleul

open.cpp: unicode fix for ProbeDVD, ProbeCDDA, ProbeVCD
parent ce53e874
...@@ -1334,7 +1334,7 @@ static char * ProbeDVD(const wxChar *device) ...@@ -1334,7 +1334,7 @@ static char * ProbeDVD(const wxChar *device)
{ {
char **ppsz_cd_drives; char **ppsz_cd_drives;
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device); const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device);
char *psz_device = (char *) tmp_buf; char *psz_device = const_cast<char *>(tmp_buf.data());
if( IsDVD(psz_device) ) if( IsDVD(psz_device) )
{ {
...@@ -1404,7 +1404,7 @@ static char * ProbeCDDA(const wxChar *device) ...@@ -1404,7 +1404,7 @@ static char * ProbeCDDA(const wxChar *device)
{ {
char *ppsz_device[2]; char *ppsz_device[2];
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device); const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device);
char *psz_device = (char *) tmp_buf; char *psz_device = const_cast<char *>(tmp_buf.data());
ppsz_device[0] = (device && *device) ? psz_device : NULL; ppsz_device[0] = (device && *device) ? psz_device : NULL;
ppsz_device[1] = NULL; ppsz_device[1] = NULL;
return ProbeDevice(ppsz_device, CDIO_FS_AUDIO, false); return ProbeDevice(ppsz_device, CDIO_FS_AUDIO, false);
...@@ -1417,7 +1417,7 @@ static char * ProbeVCD(const wxChar *device) ...@@ -1417,7 +1417,7 @@ static char * ProbeVCD(const wxChar *device)
{ {
char *ppsz_device[2]; char *ppsz_device[2];
const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device); const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(device);
char *psz_device = (char *) tmp_buf; char *psz_device = const_cast<char *>(tmp_buf.data());
ppsz_device[0] = (device && *device) ? psz_device : NULL; ppsz_device[0] = (device && *device) ? psz_device : NULL;
ppsz_device[1] = NULL; ppsz_device[1] = NULL;
return ProbeDevice(ppsz_device, return ProbeDevice(ppsz_device,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment