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; }
// 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; }
// 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; }
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; }
// 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; }
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; }