From: Joshua Simmons Date: Sat, 25 Oct 2025 17:45:35 +0000 (+0200) Subject: shark: Add RGP trigger X-Git-Url: https://git.nega.tv//gitweb.cgi?a=commitdiff_plain;h=904e4a93103af3afe735c42a573712e810b73980;p=josh%2Fnarcissus shark: Add RGP trigger --- 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),