static void change_state(MovieState new_state) { if(new_state==Movie.State) return; if(Movie.State==MOVIE_STATE_RECORD) { flush_movie(); } if(new_state==MOVIE_STATE_NONE) { // truncate movie to MaxSample length if Settings.MovieTruncate is true truncate_movie(); fclose(Movie.File); Movie.File=NULL; if(S9xMoviePlaying() || S9xMovieRecording()) // even if recording, it could have been switched to from playback { restore_previous_settings(); } } Movie.State=new_state; }
static void change_state(MovieState new_state) { if(new_state==Movie.State) return; if(Movie.State==MOVIE_STATE_RECORD) { flush_movie(); } if(new_state==MOVIE_STATE_NONE) { // truncate movie to MaxSample length if Settings.MovieTruncate is true truncate_movie(); fclose(Movie.File); Movie.File=NULL; if(S9xMovieActive()) { restore_previous_settings(); } } Movie.State=new_state; }
static void change_state(MovieState new_state) { if(new_state==Movie.State) return; if(Movie.State==MOVIE_STATE_RECORD) { flush_movie(); } Movie.State=new_state; if(new_state==MOVIE_STATE_NONE) { fclose(Movie.File); Movie.File=NULL; // FIXME: truncate movie to MaxFrame length /* truncate() could be used, if it's certain * that the savestate block is never after * the controller data block. It is not guaranteed * by the format. */ } }