Restart recording when restarting game
This commit is contained in:
+8
-2
@@ -200,8 +200,14 @@ impl ProfilerSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn start_profiling(&mut self, file_path: PathBuf) -> Result<()> {
|
async fn start_profiling(&mut self, file_path: PathBuf) -> Result<()> {
|
||||||
self.program = Some(ProgramState::new(file_path).await?);
|
let program = ProgramState::new(file_path).await?;
|
||||||
self.recording = None;
|
let recording = if self.recording.is_some() {
|
||||||
|
Some(Recording::new(&program))
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
self.program = Some(program);
|
||||||
|
self.recording = recording;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user