summaryrefslogtreecommitdiff
path: root/src/components/ClipboardCommands.tsx
blob: e1f6ef9fef9f55f0650aa554d5fda6d1981e136c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { SmartClipboardButton } from "./SmartClipboardButton";

interface ClipboardCommandsProps {
  pathExists: boolean | null;
  dllName: string;
}

export function ClipboardCommands({ pathExists, dllName }: ClipboardCommandsProps) {
  if (pathExists !== true) return null;

  const launchCmd =
    dllName === "OptiScaler.asi"
      ? "SteamDeck=0 %command%"
      : `WINEDLLOVERRIDES=${dllName.replace(".dll", "")}=n,b SteamDeck=0 %command%`;

  return (
    <SmartClipboardButton
      command={launchCmd}
      buttonText="Copy launch options"
    />
  );
}