Fix slotinfo for binary save slots
This commit is contained in:
parent
bf0d0b7ac0
commit
0ac78762a2
2 changed files with 9 additions and 7 deletions
|
@ -125,13 +125,9 @@ namespace
|
||||||
if(!slotinfo_cache.count(filename)) {
|
if(!slotinfo_cache.count(filename)) {
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
try {
|
try {
|
||||||
std::string projid = vector_to_string(read_file_relative(filename + "/projectid",
|
moviefile::brief_info info(filename);
|
||||||
""));
|
if(our_movie.projectid == info.projectid)
|
||||||
std::string rerecords = vector_to_string(read_file_relative(filename + "/rerecords",
|
out << info.rerecords << "R/" << info.current_frame << "F";
|
||||||
""));
|
|
||||||
std::string frame = vector_to_string(read_file_relative(filename + "/saveframe", ""));
|
|
||||||
if(our_movie.projectid == projid)
|
|
||||||
out << rerecords << "R/" << frame << "F";
|
|
||||||
else
|
else
|
||||||
out << "Wrong movie";
|
out << "Wrong movie";
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
|
|
|
@ -688,6 +688,12 @@ void moviefile::brief_info::binary_io(std::istream& stream)
|
||||||
case TAG_SAVESTATE:
|
case TAG_SAVESTATE:
|
||||||
this->current_frame = s.binary_read_number();
|
this->current_frame = s.binary_read_number();
|
||||||
break;
|
break;
|
||||||
|
case TAG_RRDATA: {
|
||||||
|
std::vector<char> c_rrdata;
|
||||||
|
s.binary_read_blob(c_rrdata);
|
||||||
|
this->rerecords = rrdata::count(c_rrdata);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue