Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions opennow-stable/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ function loadBootstrapVideoPreferences(): BootstrapVideoPreferences {
}
}

function hasLinuxNvidiaProprietaryDriver(): boolean {
return existsSync("/proc/driver/nvidia/version") || existsSync("/sys/module/nvidia/version");
}

const bootstrapVideoPrefs = loadBootstrapVideoPreferences();
console.log(
`[Main] Video acceleration preference: decode=${bootstrapVideoPrefs.decoderPreference}, encode=${bootstrapVideoPrefs.encoderPreference}`,
Expand All @@ -132,6 +136,8 @@ console.log(
// --- Platform-specific HW video decode features ---
const platformFeatures: string[] = [];
const isLinuxArm = process.platform === "linux" && (process.arch === "arm64" || process.arch === "arm");
const isLinuxDesktopX64 = process.platform === "linux" && !isLinuxArm;
const shouldEnableLinuxDesktopVaapi = isLinuxDesktopX64 && !hasLinuxNvidiaProprietaryDriver();

if (process.platform === "win32") {
// Windows: D3D11 + Media Foundation path for HW decode/encode acceleration
Expand All @@ -150,7 +156,7 @@ if (process.platform === "win32") {
if (bootstrapVideoPrefs.decoderPreference !== "software") {
platformFeatures.push("UseChromeOSDirectVideoDecoder");
}
} else {
} else if (shouldEnableLinuxDesktopVaapi) {
// Linux x64 desktop GPUs: VA-API path (Intel/AMD).
if (bootstrapVideoPrefs.decoderPreference !== "software") {
platformFeatures.push("VaapiVideoDecoder");
Expand Down Expand Up @@ -185,7 +191,18 @@ const disableFeatures: string[] = [
// Prevents mDNS candidate generation — faster ICE connectivity
"WebRtcHideLocalIpsWithMdns",
];
if (process.platform === "linux" && !isLinuxArm) {
if (process.platform === "linux") {
// Fedora/Bazzite Electron builds have hit renderer crashes in newer Linux font
// service backends. Keep Linux on the older path; Chromium changed the feature
// names over time, so include both known spellings.
disableFeatures.push(
"SkiaFontService",
"FontationBackend",
"FontationsFontBackend",
"FontationsLinuxSystemFonts",
);
}
if (isLinuxDesktopX64) {
// ChromeOS-only direct video decoder path interferes on regular Linux
disableFeatures.push("UseChromeOSDirectVideoDecoder");
}
Expand Down
3 changes: 0 additions & 3 deletions opennow-stable/src/renderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenNOW</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
</head>
<body>
<div id="root"></div>
Expand Down
11 changes: 7 additions & 4 deletions opennow-stable/src/renderer/src/components/ControllerButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ interface ButtonProps {
size?: number;
}

const buttonLabelFontFamily =
'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "DejaVu Sans", sans-serif';

export function ButtonA({ className, size = 18 }: ButtonProps): JSX.Element {
return (
<svg
Expand All @@ -17,7 +20,7 @@ export function ButtonA({ className, size = 18 }: ButtonProps): JSX.Element {
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="12" cy="12" r="10" stroke="#58d98a" strokeWidth="2.5" fill="rgba(88, 217, 138, 0.1)" />
<text x="50%" y="50%" dominantBaseline="central" textAnchor="middle" fontSize="12" fontWeight="900" fill="#58d98a" fontFamily="Inter, system-ui">A</text>
<text x="50%" y="50%" dominantBaseline="central" textAnchor="middle" fontSize="12" fontWeight="900" fill="#58d98a" fontFamily={buttonLabelFontFamily}>A</text>
</svg>
);
}
Expand All @@ -34,7 +37,7 @@ export function ButtonB({ className, size = 18 }: ButtonProps): JSX.Element {
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="12" cy="12" r="10" stroke="#ef4444" strokeWidth="2.5" fill="rgba(239, 68, 68, 0.1)" />
<text x="50%" y="50%" dominantBaseline="central" textAnchor="middle" fontSize="12" fontWeight="900" fill="#ef4444" fontFamily="Inter, system-ui">B</text>
<text x="50%" y="50%" dominantBaseline="central" textAnchor="middle" fontSize="12" fontWeight="900" fill="#ef4444" fontFamily={buttonLabelFontFamily}>B</text>
</svg>
);
}
Expand All @@ -51,7 +54,7 @@ export function ButtonX({ className, size = 18 }: ButtonProps): JSX.Element {
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="12" cy="12" r="10" stroke="#3b82f6" strokeWidth="2.5" fill="rgba(59, 130, 246, 0.1)" />
<text x="50%" y="50%" dominantBaseline="central" textAnchor="middle" fontSize="12" fontWeight="900" fill="#3b82f6" fontFamily="Inter, system-ui">X</text>
<text x="50%" y="50%" dominantBaseline="central" textAnchor="middle" fontSize="12" fontWeight="900" fill="#3b82f6" fontFamily={buttonLabelFontFamily}>X</text>
</svg>
);
}
Expand All @@ -68,7 +71,7 @@ export function ButtonY({ className, size = 18 }: ButtonProps): JSX.Element {
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="12" cy="12" r="10" stroke="#eab308" strokeWidth="2.5" fill="rgba(234, 179, 8, 0.1)" />
<text x="50%" y="50%" dominantBaseline="central" textAnchor="middle" fontSize="12" fontWeight="900" fill="#eab308" fontFamily="Inter, system-ui">Y</text>
<text x="50%" y="50%" dominantBaseline="central" textAnchor="middle" fontSize="12" fontWeight="900" fill="#eab308" fontFamily={buttonLabelFontFamily}>Y</text>
</svg>
);
}
Expand Down
2 changes: 1 addition & 1 deletion opennow-stable/src/renderer/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ body,
#root {
width: 100%;
height: 100%;
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "DejaVu Sans", sans-serif;
font-size: 14px;
line-height: 1.5;
color: var(--ink);
Expand Down
Loading