+static void savedata_write_thread( void *file ){
+ struct savedata *sav = file;
+ FILE *fp = fopen( sav->path, "wb" );
+ if( fp ){
+ fwrite( sav->buf, sav->len, 1, fp );
+ fclose( fp );
+ }
+ else {
+ vg_error( "Error writing savedata (%s)\n", sav->path );
+ }