Merge branch 'main' into patch-1
This commit is contained in:
commit
100e764f0c
4 changed files with 14 additions and 15 deletions
|
@ -27,7 +27,7 @@
|
||||||
"arrpc": "github:OpenAsar/arrpc#98879cae0565e6fce34e4cb6f544bf42c6a7e7c8"
|
"arrpc": "github:OpenAsar/arrpc#98879cae0565e6fce34e4cb6f544bf42c6a7e7c8"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@vencord/venmic": "^2.1.3"
|
"@vencord/venmic": "^3.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||||
|
|
|
@ -11,8 +11,8 @@ dependencies:
|
||||||
|
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@vencord/venmic':
|
'@vencord/venmic':
|
||||||
specifier: ^2.1.3
|
specifier: ^3.2.0
|
||||||
version: 2.1.4
|
version: 3.2.0
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@fal-works/esbuild-plugin-global-externals':
|
'@fal-works/esbuild-plugin-global-externals':
|
||||||
|
@ -793,8 +793,8 @@ packages:
|
||||||
type-fest: 3.13.1
|
type-fest: 3.13.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vencord/venmic@2.1.4:
|
/@vencord/venmic@3.2.0:
|
||||||
resolution: {integrity: sha512-Or//CHB9QtMcUXoDagkq0IF/7R8r7IABCaLIPtG8HCKSuOOFgBJ54PItnPXCliNKXWpwsUxj5z1WlZ4/VdwZHg==}
|
resolution: {integrity: sha512-z+Lgmr6IgjkPEIfFZ3ZwVV4aP/OFjnB6k6Ll5YpBPuDZOyqCbKTNLADApbZa/WxMfm7YpZ22g46X4FfizuprEQ==}
|
||||||
engines: {node: '>=14.15'}
|
engines: {node: '>=14.15'}
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
import "./ipc";
|
import "./ipc";
|
||||||
|
|
||||||
import { app, BrowserWindow } from "electron";
|
import { app, BrowserWindow, nativeTheme } from "electron";
|
||||||
import { checkUpdates } from "updater/main";
|
import { checkUpdates } from "updater/main";
|
||||||
|
|
||||||
import { DATA_DIR } from "./constants";
|
import { DATA_DIR } from "./constants";
|
||||||
|
@ -15,6 +15,7 @@ import { createWindows, mainWin } from "./mainWindow";
|
||||||
import { registerMediaPermissionsHandler } from "./mediaPermissions";
|
import { registerMediaPermissionsHandler } from "./mediaPermissions";
|
||||||
import { registerScreenShareHandler } from "./screenShare";
|
import { registerScreenShareHandler } from "./screenShare";
|
||||||
import { Settings } from "./settings";
|
import { Settings } from "./settings";
|
||||||
|
import { isDeckGameMode } from "./utils/steamOS";
|
||||||
|
|
||||||
if (IS_DEV) {
|
if (IS_DEV) {
|
||||||
require("source-map-support").install();
|
require("source-map-support").install();
|
||||||
|
@ -43,6 +44,9 @@ function init() {
|
||||||
"WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService,WidgetLayering"
|
"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) => {
|
app.on("second-instance", (_event, _cmdLine, _cwd, data: any) => {
|
||||||
if (data.IS_DEV) app.quit();
|
if (data.IS_DEV) app.quit();
|
||||||
else if (mainWin) {
|
else if (mainWin) {
|
||||||
|
|
|
@ -55,22 +55,17 @@ ipcMain.handle(
|
||||||
IpcEvents.VIRT_MIC_START,
|
IpcEvents.VIRT_MIC_START,
|
||||||
(_, targets: string[]) =>
|
(_, targets: string[]) =>
|
||||||
obtainVenmic()?.link({
|
obtainVenmic()?.link({
|
||||||
props: targets.map(target => ({ key: "application.name", value: target })),
|
include: targets.map(target => ({ key: "application.name", value: target })),
|
||||||
mode: "include"
|
exclude: [{ key: "application.process.id", value: getRendererAudioServicePid() }]
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
ipcMain.handle(
|
ipcMain.handle(
|
||||||
IpcEvents.VIRT_MIC_START_SYSTEM,
|
IpcEvents.VIRT_MIC_START_SYSTEM,
|
||||||
() =>
|
() =>
|
||||||
|
// @ts-expect-error venmic types are wrong. include is actually optional but typed as required in vemic
|
||||||
obtainVenmic()?.link({
|
obtainVenmic()?.link({
|
||||||
props: [
|
exclude: [{ key: "application.process.id", value: getRendererAudioServicePid() }]
|
||||||
{
|
|
||||||
key: "application.process.id",
|
|
||||||
value: getRendererAudioServicePid()
|
|
||||||
}
|
|
||||||
],
|
|
||||||
mode: "exclude"
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Reference in a new issue