mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 23:05:49 +00:00
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:
@@ -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() {
|
||||
|
||||
@@ -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