prepare code to clean signatures
This commit is contained in:
parent
bf49e00c37
commit
49c2139b4c
3 changed files with 12 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
|||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -202,7 +203,7 @@ void init_display( void )
|
|||
|
||||
int init_emulator( void )
|
||||
{
|
||||
/* If files are readble => let's go */
|
||||
/* If files are successfully read => return and let's go */
|
||||
if ( read_files() ) {
|
||||
if ( resetOnStartup )
|
||||
saturn.PC = 0x00000;
|
||||
|
@ -215,17 +216,12 @@ int init_emulator( void )
|
|||
|
||||
init_saturn();
|
||||
if ( !read_rom( normalized_rom_path ) )
|
||||
exit( 1 );
|
||||
exit( 1 ); /* can't read ROM */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int exit_emulator( void )
|
||||
{
|
||||
write_files();
|
||||
|
||||
return 1;
|
||||
}
|
||||
void exit_emulator( void ) { write_files(); }
|
||||
|
||||
/***********************************************/
|
||||
/* READING ~/.config/x48ng/{rom,ram,state,port1,port2} */
|
||||
|
@ -952,7 +948,9 @@ int write_state_file( char* filename )
|
|||
write_32( fp, &saturn.mem_cntl[ i ].config[ 0 ] );
|
||||
write_32( fp, &saturn.mem_cntl[ i ].config[ 1 ] );
|
||||
}
|
||||
|
||||
fclose( fp );
|
||||
|
||||
if ( verbose )
|
||||
printf( "wrote %s\n", filename );
|
||||
|
||||
|
|
|
@ -321,11 +321,11 @@ extern int annunciators_bits[ NB_ANNUNCIATORS ];
|
|||
/**************/
|
||||
/* emu_init.c */
|
||||
/**************/
|
||||
extern void init_display( void ); /* used in ui_*.c */
|
||||
extern int init_emulator( void ); /* used in main.c */
|
||||
extern int exit_emulator( void ); /* debugger.c; main.c; ui_*.c */
|
||||
extern int read_files( void ); /* debugger.c */
|
||||
extern int write_files( void ); /* used in debugger.c */
|
||||
extern void init_display( void ); /* used in ui_*.c */
|
||||
extern int init_emulator( void ); /* used in main.c */
|
||||
extern void exit_emulator( void ); /* debugger.c; main.c; ui_*.c */
|
||||
extern int read_files( void ); /* debugger.c */
|
||||
extern int write_files( void ); /* used in debugger.c */
|
||||
|
||||
/***************/
|
||||
/* emu_timer.c */
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <pwd.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue