示例#1
0
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))
 {
 }
}