Skip to content

Commit

Permalink
fix: shut function (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
iss committed Nov 4, 2019
1 parent 687d1ea commit 606cb80
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
9 changes: 6 additions & 3 deletions disk.c
Expand Up @@ -1287,8 +1287,10 @@ unsigned char microdisc_read( struct microdisc *md, unsigned short addr )
return md->drq|0x7f;

default:
return via_read( &md->oric->via, addr );
break;
}

return via_read( &md->oric->via, addr );
}

void microdisc_write( struct microdisc *md, unsigned short addr, unsigned char data )
Expand Down Expand Up @@ -1396,10 +1398,11 @@ unsigned char jasmin_read( struct jasmin *j, unsigned short addr )
case 0x3fb:
return j->romdis;


default:
return via_read( &j->oric->via, addr );
break;
}

return via_read( &j->oric->via, addr );
}

void jasmin_write( struct jasmin *j, unsigned short addr, unsigned char data )
Expand Down
9 changes: 2 additions & 7 deletions machine.c
Expand Up @@ -1864,11 +1864,6 @@ void shut_machine( struct machine *oric )
mon_freesyms( &oric->tele_banksyms[7] );
}

static void shut(void)
{

}

void setdrivetype( struct machine *oric, struct osdmenuitem *mitem, int type )
{
if( oric->drivetype == type )
Expand Down Expand Up @@ -1899,7 +1894,7 @@ void setdrivetype( struct machine *oric, struct osdmenuitem *mitem, int type )
mon_state_reset( oric );
if( !init_machine( oric, oric->type, SDL_FALSE ) )
{
shut();
shut( oric );
exit( EXIT_FAILURE );
}

Expand Down Expand Up @@ -1928,7 +1923,7 @@ void swapmach( struct machine *oric, struct osdmenuitem *mitem, int which )
mon_state_reset( oric );
if( !init_machine( oric, which, which!=oric->type ) )
{
shut();
shut( oric );
exit( EXIT_FAILURE );
}
}
Expand Down
2 changes: 1 addition & 1 deletion main.c
Expand Up @@ -1223,7 +1223,7 @@ SDL_bool init( struct machine *oric, int argc, char *argv[] )
return SDL_TRUE;
}

static void shut( struct machine *oric )
void shut( struct machine *oric )
{
if( vidcap ) avi_close( &vidcap );
#if defined(DEBUG_CPU_TRACE) && DEBUG_CPU_TRACE > 0
Expand Down
1 change: 1 addition & 0 deletions main.h
Expand Up @@ -22,3 +22,4 @@ SDL_bool read_config_string( char *buf, char *token, char *dest, Sint32 maxlen )
SDL_bool read_config_bool( char *buf, char *token, SDL_bool *dest );
SDL_bool read_config_option( char *buf, char *token, Sint32 *dest, char **options );
SDL_bool read_config_int( char *buf, char *token, int *dest, int min, int max );
void shut( struct machine *oric );

0 comments on commit 606cb80

Please sign in to comment.