diff --git a/boutons.c b/boutons.c index 44a501f3..ea29738f 100644 --- a/boutons.c +++ b/boutons.c @@ -2457,9 +2457,7 @@ byte Bouton_Load_ou_Save(byte Load, byte Image) struct Fenetre_Bouton_dropdown * Dropdown_des_formats; short Temp; int Bidon=0; // Sert à appeler SDL_GetKeyState - word Drives_Debut_Y; byte Charger_ou_sauver_l_image=0; - char Nom_drive[3]=" "; byte On_a_clicke_sur_OK=0;// Indique si on a clické sur Load ou Save ou sur //un bouton enclenchant Load ou Save juste après. struct Composantes * Palette_initiale; // | Données concernant l'image qui @@ -2568,15 +2566,6 @@ byte Bouton_Load_ou_Save(byte Load, byte Image) // Selecteur de Lecteur / Volume Fenetre_Definir_bouton_normal(8,21,120,14,"Select drive",0,1,SDLK_LAST); // 9 - // Définition des boutons représentant les lecteurs - Drives_Debut_Y=(Nb_drives<=8)? 23 : 18; - for (Temp=0; Tempme_dummy == 0 && strcmp(Liste_points_montage->me_mountdir,"/") && strcmp(Liste_points_montage->me_mountdir,"/home")) + { + Ajouter_element_a_la_liste(Liste_points_montage->me_mountdir,2); + Liste_Nb_repertoires++; + } + next = Liste_points_montage -> me_next; +#if !(defined(__macosx__) || defined(__FreeBSD__)) + free(Liste_points_montage -> me_type); +#endif + free(Liste_points_montage -> me_devname); + free(Liste_points_montage -> me_mountdir); + free(Liste_points_montage); + Liste_points_montage = next; } + } #endif Liste_Nb_elements=Liste_Nb_repertoires+Liste_Nb_fichiers; diff --git a/global.h b/global.h index 989b2a51..e3af3458 100644 --- a/global.h +++ b/global.h @@ -651,10 +651,7 @@ GFX2_GLOBAL struct -// Informations sur les lecteurs - -GFX2_GLOBAL byte Nb_drives; -GFX2_GLOBAL struct T_Drive Drive[26]; +// Informations sur les lecteurs et autres images GFX2_GLOBAL byte SPRITE_DRIVE[NB_SPRITES_DRIVES][HAUTEUR_SPRITE_DRIVE][LARGEUR_SPRITE_DRIVE]; diff --git a/init.c b/init.c index 896a7fd0..63146e37 100644 --- a/init.c +++ b/init.c @@ -69,23 +69,12 @@ #include "mountlist.h" // read_file_system_list #include "loadsave.h" // Image_emergency_backup -// Ajouter un lecteur à la liste de lecteurs -void Ajouter_lecteur(char Lettre, byte Type, char *Chemin) -{ - Drive[Nb_drives].Lettre=Lettre; - Drive[Nb_drives].Type =Type; - Drive[Nb_drives].Chemin=(char *)malloc(strlen(Chemin)+1); - strcpy(Drive[Nb_drives].Chemin, Chemin); - - Nb_drives++; -} - // Rechercher la liste et le type des lecteurs de la machine #if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) void bstrtostr( BSTR in, STRPTR out, TEXT max ); #endif - +/* void Rechercher_drives(void) { #if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) @@ -188,14 +177,7 @@ void Rechercher_drives(void) #endif } - -// Active un lecteur, changeant normalement le répertoire en cours. -// Renvoie 0 si ok, -1 si problème. -int ActiverLecteur(int NumeroLecteur) -{ - return chdir(Drive[NumeroLecteur].Chemin); -} - +*/ // Fonctions de lecture dans la skin de l'interface graphique void Chercher_bas(SDL_Surface *GUI, int *Debut_X, int *Debut_Y, byte Couleur_neutre,char * Section) { diff --git a/init.h b/init.h index 0b6749db..b908e9f7 100644 --- a/init.h +++ b/init.h @@ -18,7 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -void Rechercher_drives(void); void Charger_DAT(void); void Initialisation_des_boutons(void); void Initialisation_des_operations(void); @@ -26,6 +25,5 @@ int Charger_CFG(int Tout_charger); int Sauver_CFG(void); void Initialiser_les_tables_de_multiplication(void); void Definition_des_modes_video(void); -int ActiverLecteur(int); void Config_par_defaut(void); void Initialiser_sighandler(void); diff --git a/main.c b/main.c index a5d29c74..1db8f4fc 100644 --- a/main.c +++ b/main.c @@ -304,8 +304,6 @@ void Initialisation_du_programme(int argc,char * argv[]) // Choose directory for settings (read/write) Set_Config_Directory(Repertoire_du_programme,Repertoire_de_configuration); - // On détecte les lecteurs qui sont accessibles: - Rechercher_drives(); // On détermine le répertoire courant: Determiner_repertoire_courant();