mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-11-09 15:33:31 +00:00
fix: Linux GPU fallback and HUD window show safety net
- Add Linux GPU config: use EGL (better Wayland compat), disable VAAPI video decoder/encoder (many distros ship broken drivers causing 'vaInitialize failed' and preventing renderer from loading) - Add ready-to-show fallback for HUD window: if did-finish-load never fires (GPU failure), show the window after 500ms via ready-to-show Ref #261
This commit is contained in:
1 parent
75791cbf79
commit
dbd5a2a9a2
2 files changed
+20
No files matched your search
@@ -68,6 +68,15 @@ function configureGpuAccelerationSwitches() {
|
||||
app.commandLine.appendSwitch("use-angle", "d3d11");
|
||||
return;
|
||||
}
|
||||
|
||||
// Linux: 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.
|
||||
if (process.platform === "linux") {
|
||||
app.commandLine.appendSwitch("use-gl", "egl");
|
||||
app.commandLine.appendSwitch("disable-features", "VaapiVideoDecoder,VaapiVideoEncoder");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
async function logSmokeExportGpuDiagnostics() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user