Save/Load: Fixed backspace, limit 255 characters, various fixes for long filenames,
(linux) drive '~' uses $HOME environment variable. Fixed some more struct packing issues (ex: GIF saving) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@163 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
13
init.c
13
init.c
@@ -140,6 +140,19 @@ void Rechercher_drives(void)
|
||||
// Renvoie 0 si ok, -1 si problème.
|
||||
int ActiverLecteur(int NumeroLecteur)
|
||||
{
|
||||
// Cas particulier du lecteur ~
|
||||
if (Drive[NumeroLecteur].Lettre == '~')
|
||||
{
|
||||
char * Home = getenv("HOME");
|
||||
if (! Home)
|
||||
return -1;
|
||||
#ifdef __linux__
|
||||
return chdir(Home);
|
||||
#else
|
||||
return ! SetCurrentDirectory(Home);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
char NomLecteur[]=" ";
|
||||
NomLecteur[0]=Drive[NumeroLecteur].Lettre;
|
||||
|
||||
Reference in New Issue
Block a user