fceux icon indicating copy to clipboard operation
fceux copied to clipboard

Bug? Extra Save State Backups being created

Open ReyVGM opened this issue 1 year ago • 3 comments

Describe the bug I have the "Backup savestates" option enabled. It works fine, but I notice it always creates TWO backups of slot 0. It even creates that extra backup if I LOAD any save state slot.

To Reproduce Steps to reproduce the behavior:

  1. Boot any game.
  2. Load any save slot (even if it's empty)
  3. It will create a backup called "gamename.bak.fc0" (regular backups are named "gamename-bak.fc0", notice the dash there)

Expected behavior It should not create that extra ".bak.fc0"

Screenshots 1

(please complete the following information):

  • OS and Version: Win10 Pro 64bit
  • FCEUX 2.6.6 non QT

ReyVGM avatar Mar 08 '24 07:03 ReyVGM

Anyone?

ReyVGM avatar Jun 21 '24 22:06 ReyVGM

appears to be intentional regardless of a state exists or not for movie purposes

in state.cpp line 1133

string GetBackupFileName()
{
	//This backup savestate is a special one specifically made whenever a loadstate occurs so that the user's place in a movie/game is never lost
	//particularly from unintentional loadstating
	string filename;
	int x;


	filename = FCEU_MakeFName(FCEUMKF_STATE,CurrentState,0);	//Generate normal savestate filename
	x = filename.find_last_of(".");		//Find last dot
	filename = filename.substr(0,x);	//Chop off file extension
	filename.append(".bak.fc0");		//add .bak


	return filename;
}

negativeExponent avatar Jun 22 '24 02:06 negativeExponent

I see, thanks for the info. But shouldn't that only generate when you're making a movie then?

It's kind of annoying to always have that fake backup save constantly generating even if you're not messing with making movies.

ReyVGM avatar Jun 22 '24 03:06 ReyVGM