示例#1
0
int StatedSave(int nSlot)
{
	TCHAR szFilter[1024];
	int nRet;
	int bOldPause;

	if (bDrvOkay == 0) {
		return 1;
	}

	if (nSlot) {
		CreateStateName(nSlot);
	} else {
		_stprintf(szChoice, _T("GAME:\\savestates\\%S.fs"), BurnDrvGetText(DRV_NAME));
		StateMakeOfn(szFilter);
		
		bOldPause = bRunPause;
		bRunPause = 1; 
		bRunPause = bOldPause;		
	}

	nRet = BurnStateSave(szChoice, 1);
 
	return nRet;
}
示例#2
0
// The automatic save
int StatedAuto(int bSave)
{
	static TCHAR szName[32] = _T("");
	int nRet;

	_stprintf(szName, _T("config/games/%s.fs"), BurnDrvGetText(DRV_NAME));

	if (bSave == 0) {
		nRet = BurnStateLoad(szName, bDrvSaveAll, NULL);		// Load ram
		if (nRet && bDrvSaveAll)	{
			nRet = BurnStateLoad(szName, 0, NULL);				// Couldn't get all - okay just try the nvram
		}
	} else {
		nRet = BurnStateSave(szName, bDrvSaveAll);				// Save ram
	}

	return nRet;
}
示例#3
0
// The automatic save
int StatedAuto(int bSave)
{
#if 0
	static TCHAR szName[MAX_PATH] = _T("");
	int nRet;

	_stprintf(szName, _T("GAME:\\config\\games\\%S.fs"), BurnDrvGetText(DRV_NAME));

	if (bSave == 0) {
		nRet = BurnStateLoad(szName, bDrvSaveAll, NULL);		// Load ram
		if (nRet && bDrvSaveAll)	{
			nRet = BurnStateLoad(szName, 0, NULL);				// Couldn't get all - okay just try the nvram
		}
	} else {
		nRet = BurnStateSave(szName, bDrvSaveAll);				// Save ram
	}

	return nRet;
#endif
	return 0;
}
示例#4
0
int StatedSave(int nSlot)
{
	int nRet;

	if (bDrvOkay == 0) {
		return 1;
	}

    CreateStateName(nSlot);

	nRet = BurnStateSave(szChoice, 1);
	if( !nRet )
	{
		char bmppath[MAX_PATH];
		sprintf( bmppath, "%s.bmp", szChoice );
		SDL_LockSurface( sdlsFramebuf );
		SDL_SaveBMP( sdlsFramebuf, bmppath );
		SDL_UnlockSurface( sdlsFramebuf );
	}

	return nRet;
}
示例#5
0
// The automatic save
int StatedAuto(int bSave)
{
	static TCHAR szName[512] = "";
	int nRet;

	sprintf(szName, "%s/states/%s.fs", getDataPath(), BurnDrvGetText(DRV_NAME));

	if (bSave == 0)
	{
		nRet = BurnStateLoad(szName, bDrvSaveAll, NULL);		// Load ram
		if (nRet && bDrvSaveAll)
		{
			nRet = BurnStateLoad(szName, 0, NULL);				// Couldn't get all - okay just try the nvram
		}
	}
	else
	{
		nRet = BurnStateSave(szName, bDrvSaveAll);				// Save ram
	}

	return nRet;
}
示例#6
0
int StatedSave(int nSlot)
{
	TCHAR szFilter[1024];
	int nRet;
	int bOldPause;

	if (bDrvOkay == 0) {
		return 1;
	}

	if (nSlot) {
		CreateStateName(nSlot);
	} else {
		_stprintf(szChoice, _T("%s"), BurnDrvGetText(DRV_NAME));
		MakeOfn(szFilter);
		ofn.lpstrTitle = FBALoadStringEx(hAppInst, IDS_STATE_SAVE, true);
		ofn.Flags |= OFN_OVERWRITEPROMPT;

		bOldPause = bRunPause;
		bRunPause = 1;
		nRet = GetSaveFileName(&ofn);
		bRunPause = bOldPause;

		if (nRet == 0) {		// Error
			return 1;
		}
	}

	nRet = BurnStateSave(szChoice, 1);

	if (nRet && !nSlot) {
		FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_DISK_CREATE));
		FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_DISK_STATE));
		FBAPopupDisplay(PUF_TYPE_ERROR);
	}

	return nRet;
}