Start profiler UI/thread

This commit is contained in:
2025-08-27 22:49:44 -04:00
parent 38b34c9cf9
commit 3bfdcc9366
8 changed files with 218 additions and 54 deletions
+8 -5
View File
@@ -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(())
}