movie: Add clock init time to CTM header

This adds a clock init time field to the CTM header. The clock settings would be overridden when playing a movie. And when recording a movie, if the clock is set to System Time, it would be set to fixed init time at the current moment as well. In this way this keeps consistency with the RNG even if the user does just no setting.
This commit is contained in:
zhupengfei 2018-09-26 20:38:57 +08:00
parent 20e42592ff
commit ae5c658997
No known key found for this signature in database
GPG key ID: 85B82A3E62174206
5 changed files with 96 additions and 20 deletions

View file

@ -271,6 +271,13 @@ int main(int argc, char** argv) {
return -1;
}
if (!movie_record.empty()) {
Core::Movie::GetInstance().PrepareForRecording();
}
if (!movie_play.empty()) {
Core::Movie::GetInstance().PrepareForPlayback(movie_play);
}
// Apply the command line arguments
Settings::values.gdbstub_port = gdb_port;
Settings::values.use_gdbstub = use_gdbstub;
@ -332,7 +339,7 @@ int main(int argc, char** argv) {
}
if (!movie_play.empty()) {
Core::Movie::GetInstance().StartPlayback(movie_play);
Core::Movie::GetInstance().StartPlayback(movie_play, [] {});
}
if (!movie_record.empty()) {
Core::Movie::GetInstance().StartRecording(movie_record);