Start profiler UI/thread
This commit is contained in:
+8
-5
@@ -22,6 +22,7 @@ mod images;
|
||||
mod input;
|
||||
mod memory;
|
||||
mod persistence;
|
||||
mod profiler;
|
||||
mod window;
|
||||
|
||||
#[derive(Parser)]
|
||||
@@ -110,10 +111,7 @@ fn main() -> Result<()> {
|
||||
builder = builder.start_paused(true);
|
||||
}
|
||||
if args.profile {
|
||||
if args.rom.is_none() {
|
||||
bail!("to start profiling, please select a game.");
|
||||
}
|
||||
builder = builder.monitor_events(true)
|
||||
builder = builder.start_paused(true)
|
||||
}
|
||||
|
||||
ThreadBuilder::default()
|
||||
@@ -133,6 +131,11 @@ fn main() -> Result<()> {
|
||||
let event_loop = EventLoop::with_user_event().build().unwrap();
|
||||
event_loop.set_control_flow(ControlFlow::Poll);
|
||||
let proxy = event_loop.create_proxy();
|
||||
event_loop.run_app(&mut Application::new(client, proxy, args.debug_port))?;
|
||||
event_loop.run_app(&mut Application::new(
|
||||
client,
|
||||
proxy,
|
||||
args.debug_port,
|
||||
args.profile,
|
||||
))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user