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