Merge pull request #264 from webadderall/fix/linux-gpu-hud-fallback

fix: Linux GPU fallback and HUD window show safety net
This commit is contained in:
webadderall
2026-04-18 22:12:25 +10:00
committed by GitHub
2 changed files with 17 additions and 0 deletions
+6
View File
@@ -68,6 +68,12 @@ function configureGpuAccelerationSwitches() {
app.commandLine.appendSwitch("use-angle", "d3d11");
return;
}
// Linux (and other Unix): prefer EGL over GLX for better Wayland compatibility.
// Disable VAAPI — many distros ship broken drivers that cause
// "vaInitialize failed" and prevent the renderer from loading.
app.commandLine.appendSwitch("use-gl", "egl");
app.commandLine.appendSwitch("disable-features", "VaapiVideoDecoder,VaapiVideoEncoder");
}
async function logSmokeExportGpuDiagnostics() {
+11
View File
@@ -498,6 +498,17 @@ export function createHudOverlayWindow(): BrowserWindow {
}, 100);
});
// Safety net: on Linux the renderer may fail to fire did-finish-load
// (e.g. GPU/VAAPI errors). Show the window after ready-to-show as fallback.
win.once("ready-to-show", () => {
setTimeout(() => {
if (!win.isDestroyed() && !win.isVisible()) {
win.show();
win.moveTop();
}
}, 500);
});
hudOverlayWindow = win;
// Reset the user's saved HUD position when displays change so the bar