MCPcopy Create free account
hub / github.com/TASEmulators/fceux / CheckBackupSaveStateExist

Function CheckBackupSaveStateExist

src/state.cpp:1124–1144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1122}
1123
1124bool CheckBackupSaveStateExist()
1125{
1126 //This function simply checks to see if the backup loadstate exists, the backup loadstate is a special savestate
1127 //That is made before loading any state, so that the user never loses his data
1128 string filename = GetBackupFileName(); //Get backup savestate filename
1129
1130 //Check if this filename exists
1131 fstream test;
1132 test.open(filename.c_str(),fstream::in);
1133
1134 if (test.fail())
1135 {
1136 test.close();
1137 return false;
1138 }
1139 else
1140 {
1141 test.close();
1142 return true;
1143 }
1144}
1145
1146void BackupLoadState()
1147{

Callers 3

LoadBackupFunction · 0.85
UpdateContextMenuItemsFunction · 0.85
AppWndProcFunction · 0.85

Calls 4

GetBackupFileNameFunction · 0.85
failMethod · 0.80
openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected