SteamOS: add flatpak support using steam.pipe (#283)

This commit is contained in:
AAGaming
2023-12-22 08:56:11 -05:00
committed by GitHub
parent 40b952d8bf
commit aa397d003c
3 changed files with 41 additions and 16 deletions

View File

@@ -7,6 +7,7 @@
import { BrowserWindow, shell } from "electron";
import { Settings } from "../settings";
import { execSteamURL, isDeckGameMode, steamOpenURL } from "./steamOS";
export function makeLinksOpenExternally(win: BrowserWindow) {
win.webContents.setWindowOpenHandler(({ url }) => {
@@ -30,9 +31,20 @@ export function makeLinksOpenExternally(win: BrowserWindow) {
}
// eslint-disable-next-line no-fallthrough
case "mailto:":
case "steam:":
case "spotify:":
shell.openExternal(url);
if (isDeckGameMode) {
steamOpenURL(url);
} else {
shell.openExternal(url);
}
break;
case "steam:":
if (isDeckGameMode) {
execSteamURL(url);
} else {
shell.openExternal(url);
}
break;
}
return { action: "deny" };