Commit cec120d5 authored by Rafaël Carré's avatar Rafaël Carré

Use only wide char functions, on win9x too

win9x testers, raise your hand
parent 3d1a131f
......@@ -416,20 +416,12 @@ void *vlc_opendir_wrapper( const char *psz_path )
return (void *)p_dir;
}
if (GetVersion() < 0x80000000)
{
/* for Windows NT and above */
wchar_t wpath[MAX_PATH + 1];
if (!MultiByteToWideChar (CP_UTF8, 0, psz_path, -1, wpath, MAX_PATH))
return NULL;
wpath[MAX_PATH] = L'\0';
p_real_dir = _wopendir( wpath );
}
else
{
p_real_dir = opendir( psz_path );
}
if ( p_real_dir == NULL )
return NULL;
......@@ -459,10 +451,7 @@ struct dirent *vlc_readdir_wrapper( void *_p_dir )
return &p_dir->dd_dir;
}
if( GetVersion() < 0x80000000 )
return _wreaddir( p_dir->p_real_dir );
else
return readdir( p_dir->p_real_dir );
}
/* Drive letters mode */
......@@ -488,11 +477,7 @@ int vlc_closedir_wrapper( void *_p_dir )
if ( p_dir->p_real_dir != NULL )
{
int i_ret;
if( GetVersion() < 0x80000000 )
i_ret = _wclosedir( p_dir->p_real_dir );
else
i_ret = closedir( p_dir->p_real_dir );
int i_ret = _wclosedir( p_dir->p_real_dir );
free( p_dir );
return i_ret;
}
......
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