diff --git a/src/main/index.ts b/src/main/index.ts index ef1892f..f73a543 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -6,7 +6,7 @@ import "./ipc"; -import { app, BrowserWindow } from "electron"; +import { app, BrowserWindow, nativeTheme } from "electron"; import { checkUpdates } from "updater/main"; import { DATA_DIR } from "./constants"; @@ -15,6 +15,7 @@ import { createWindows, mainWin } from "./mainWindow"; import { registerMediaPermissionsHandler } from "./mediaPermissions"; import { registerScreenShareHandler } from "./screenShare"; import { Settings } from "./settings"; +import { isDeckGameMode } from "./utils/steamOS"; if (IS_DEV) { require("source-map-support").install(); @@ -43,6 +44,9 @@ function init() { "WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService,WidgetLayering" ); + // In the Flatpak on SteamOS the theme is detected as light, but SteamOS only has a dark mode, so we just override it + if (isDeckGameMode) nativeTheme.themeSource = "dark"; + app.on("second-instance", (_event, _cmdLine, _cwd, data: any) => { if (data.IS_DEV) app.quit(); else if (mainWin) {