From e8bedf9d52e8cefe31ae05f6a3ed96aa94f7c78c Mon Sep 17 00:00:00 2001 From: Josh Simmons Date: Sat, 30 Nov 2024 13:43:17 +0100 Subject: [PATCH] shark: Deal with SDL3 environment variables --- title/shark/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/title/shark/src/main.rs b/title/shark/src/main.rs index 0d5f7f4..9d5e215 100644 --- a/title/shark/src/main.rs +++ b/title/shark/src/main.rs @@ -203,7 +203,11 @@ pub fn main() { // Default to wayland because otherwise HiDPI is totally borked. // Unless renderdoc is attached, in which case wayland would break capture. - if renderdoc.is_none() && std::env::var("SDL_VIDEODRIVER").is_err() { + if renderdoc.is_none() + && std::env::var("SDL_VIDEODRIVER").is_err() + // Hot new SDL 3 environment variables! + && std::env::var("SDL_VIDEO_DRIVER").is_err() + { std::env::set_var("SDL_VIDEODRIVER", "wayland") } -- 2.49.0