Skip to content

Commit

Permalink
fix launcher on deck
Browse files Browse the repository at this point in the history
  • Loading branch information
Vixea committed Dec 21, 2024
1 parent 5c99680 commit 0f99183
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion alvr/launcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod ui;

use eframe::egui::{IconData, ViewportBuilder};
use ico::IconDir;
use std::{collections::BTreeMap, io::Cursor, sync::mpsc, thread};
use std::{collections::BTreeMap, env, fs, io::Cursor, sync::mpsc, thread};
use ui::Launcher;

pub struct ReleaseChannelsInfo {
Expand Down Expand Up @@ -53,6 +53,14 @@ fn main() {
.unwrap();
let image = ico.entries().first().unwrap().decode().unwrap();

// Workaround for the steam deck
if fs::read_to_string("/sys/devices/virtual/dmi/id/board_vendor")
.map(|vendor| vendor.trim() == "Valve")
.unwrap_or(false)
{
env::set_var("WINIT_X11_SCALE_FACTOR", "1");
}

eframe::run_native(
"ALVR Launcher",
eframe::NativeOptions {
Expand Down

0 comments on commit 0f99183

Please sign in to comment.