예제 #1
0
파일: state.c 프로젝트: CatalystG/fceu-next
void FCEUI_LoadState(char *fname) {
	StateShow = 0;

	FCEUMOV_Stop();

	/* For network play, be load the state locally, and then save the state to a temporary file,
		   and send that.  This insures that if an older state is loaded that is missing some
		   information expected in newer save states, desynchronization won't occur(at least not
		   from this ;)).
	*/
	if (FCEUSS_Load(fname))
		if (FCEUnetplay) {
			char *fn = FCEU_MakeFName(FCEUMKF_NPTEMP, 0, 0);
			MEM_TYPE *fp;

			if ((fp = fopen(fn, "wb"))) {
				if (FCEUSS_SaveFP(fp)) {
					fclose(fp);
					FCEUNET_SendFile(FCEUNPCMD_LOADSTATE, fn);
				} else fclose(fp);
				unlink(fn);
			}
			free(fn);
		}
}
예제 #2
0
파일: state.c 프로젝트: RuiVarela/rengine
void FCEUI_LoadState(char *fname)
{
 StateShow=0;

 FCEUMOV_Stop();

 /* For network play, be load the state locally, and then save the state to a temporary file,
    and send that.  This insures that if an older state is loaded that is missing some
    information expected in newer save states, desynchronization won't occur(at least not
    from this ;)).
 */
 if(FCEUSS_Load(fname))
 {
 }
}