summaryrefslogtreecommitdiffstats
path: root/Gui/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'Gui/cfg.c')
-rw-r--r--Gui/cfg.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/Gui/cfg.c b/Gui/cfg.c
index b46a56c551..17cca48eb6 100644
--- a/Gui/cfg.c
+++ b/Gui/cfg.c
@@ -230,6 +230,21 @@ int cfg_read( void )
}
free( cfg );
+// -- reade file loader history
+ cfg=get_path( "gui.history" );
+ if ( (f=fopen( cfg,"rt+" )) )
+ {
+ int i = 0;
+ while ( !feof( f ) )
+ {
+ char tmp[512];
+ if ( gfgets( tmp,512,f ) == NULL ) continue;
+ fsHistory[i++]=gstrdup( tmp );
+ }
+ fclose( f );
+ }
+ free( cfg );
+
#ifdef USE_SETLOCALE
setlocale( LC_ALL,"" );
#endif
@@ -315,6 +330,18 @@ int cfg_write( void )
}
free( cfg );
+// -- save file loader history
+ cfg=get_path( "gui.history" );
+ if ( (f=fopen( cfg,"wt+" )) )
+ {
+ int i = 0;
+// while ( fsHistory[i] != NULL )
+ for ( i=0;i < 5; i++)
+ if( fsHistory[i] ) fprintf( f,"%s\n",fsHistory[i] );
+ fclose( f );
+ }
+ free( cfg );
+
#ifdef USE_SETLOCALE
setlocale( LC_ALL,"" );
#endif