]> git.nega.tv - josh/narcissus/commitdiff
shark: Deal with SDL3 environment variables
authorJosh Simmons <josh@nega.tv>
Sat, 30 Nov 2024 12:43:17 +0000 (13:43 +0100)
committerJosh Simmons <josh@nega.tv>
Sat, 30 Nov 2024 12:43:17 +0000 (13:43 +0100)
title/shark/src/main.rs

index 0d5f7f4c7abf22c1593a056811758ba5d8bcc8cd..9d5e21520689ad0238055f87b657660ac5a269fd 100644 (file)
@@ -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")
     }