From 074b5f88214d3128495fdc9f6f0d2c9c2b70318f Mon Sep 17 00:00:00 2001 From: Jimb Esser Date: Tue, 17 Dec 2024 18:26:30 -0800 Subject: [PATCH] Update Electron example to allow the Steam overlay to work Reference: https://www.reddit.com/r/gamedev/comments/mc9s5x/has_anyone_successfully_integrate_steam_overlay/ In my tests (on only one system), only `--in-process-gpu` seemed to be required though (possibly `--disable-direct-composition` is only for older Chromium/Electron versions...) --- samples/electron/start.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/electron/start.js b/samples/electron/start.js index e7fa9bd0..3bbbec87 100644 --- a/samples/electron/start.js +++ b/samples/electron/start.js @@ -6,6 +6,8 @@ const BrowserWindow = electron.BrowserWindow; var mainWindow = null; +app.commandLine.appendSwitch('--in-process-gpu', '--disable-direct-composition'); // Allows the Steam overlay to work + app.on('window-all-closed', function() { if (process.platform != 'darwin') app.quit();