From 904e4a93103af3afe735c42a573712e810b73980 Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Sat, 25 Oct 2025 19:45:35 +0200 Subject: [PATCH] shark: Add RGP trigger --- title/shark/src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/title/shark/src/main.rs b/title/shark/src/main.rs index 8632d5c..f5e4974 100644 --- a/title/shark/src/main.rs +++ b/title/shark/src/main.rs @@ -28,6 +28,8 @@ pub fn main() { unsafe { std::env::set_var("RUST_BACKTRACE", "1") } } + let rgp_trigger_path = std::env::var("MESA_VK_TRACE_TRIGGER").ok(); + let renderdoc = rdoc::RenderdocApi1_5_0::load(); // Default to wayland because otherwise HiDPI is totally borked. @@ -148,6 +150,13 @@ pub fn main() { continue 'poll_events; } + if let Some(trigger_file) = &rgp_trigger_path + && down + && key == Key::F12 + { + std::fs::File::create(trigger_file).unwrap(); + } + let action = match key { Key::Left | Key::A => Some(Action::Left), Key::Right | Key::D => Some(Action::Right), -- 2.51.1