Merge branch 'Vencord:main' into main
This commit is contained in:
22
package.json
22
package.json
@@ -35,27 +35,27 @@
|
||||
"devDependencies": {
|
||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||
"@stylistic/eslint-plugin": "^4.2.0",
|
||||
"@types/node": "^22.13.17",
|
||||
"@types/node": "^22.15.17",
|
||||
"@types/react": "18.3.1",
|
||||
"@vencord/types": "^1.11.5",
|
||||
"dotenv": "^16.4.7",
|
||||
"electron": "^35.1.5",
|
||||
"dotenv": "^16.5.0",
|
||||
"electron": "^36.2.0",
|
||||
"electron-builder": "^26.0.12",
|
||||
"esbuild": "^0.25.2",
|
||||
"eslint": "^9.23.0",
|
||||
"esbuild": "^0.25.4",
|
||||
"eslint": "^9.26.0",
|
||||
"eslint-import-resolver-alias": "^1.1.2",
|
||||
"eslint-plugin-path-alias": "^2.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.5",
|
||||
"eslint-plugin-prettier": "^5.4.0",
|
||||
"eslint-plugin-simple-header": "^1.2.2",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"eslint-plugin-unused-imports": "^4.1.4",
|
||||
"prettier": "^3.5.3",
|
||||
"source-map-support": "^0.5.21",
|
||||
"tsx": "^4.19.3",
|
||||
"type-fest": "^4.39.0",
|
||||
"typescript": "^5.8.2",
|
||||
"typescript-eslint": "^8.29.0",
|
||||
"xml-formatter": "^3.6.5"
|
||||
"tsx": "^4.19.4",
|
||||
"type-fest": "^4.41.0",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.32.1",
|
||||
"xml-formatter": "^3.6.6"
|
||||
},
|
||||
"packageManager": "pnpm@10.7.1",
|
||||
"engines": {
|
||||
|
||||
1166
pnpm-lock.yaml
generated
1166
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -28,23 +28,26 @@ console.log("Vesktop v" + app.getVersion());
|
||||
// Make the Vencord files use our DATA_DIR
|
||||
process.env.VENCORD_USER_DATA_DIR = DATA_DIR;
|
||||
|
||||
const isLinux = process.platform === "linux";
|
||||
|
||||
function init() {
|
||||
app.setAsDefaultProtocolClient("discord");
|
||||
|
||||
const { disableSmoothScroll, hardwareAcceleration } = Settings.store;
|
||||
|
||||
const enabledFeatures = app.commandLine.getSwitchValue("enable-features").split(",");
|
||||
const disabledFeatures = app.commandLine.getSwitchValue("disable-features").split(",");
|
||||
const enabledFeatures = new Set(app.commandLine.getSwitchValue("enable-features").split(","));
|
||||
const disabledFeatures = new Set(app.commandLine.getSwitchValue("disable-features").split(","));
|
||||
|
||||
if (hardwareAcceleration === false) {
|
||||
app.disableHardwareAcceleration();
|
||||
} else {
|
||||
enabledFeatures.push(
|
||||
"AcceleratedVideoDecodeLinuxGL",
|
||||
"AcceleratedVideoEncoder",
|
||||
"AcceleratedVideoDecoder",
|
||||
"AcceleratedVideoDecodeLinuxZeroCopyGL"
|
||||
);
|
||||
enabledFeatures.add("AcceleratedVideoEncoder");
|
||||
enabledFeatures.add("AcceleratedVideoDecoder");
|
||||
|
||||
if (isLinux) {
|
||||
enabledFeatures.add("AcceleratedVideoDecodeLinuxGL");
|
||||
enabledFeatures.add("AcceleratedVideoDecodeLinuxZeroCopyGL");
|
||||
}
|
||||
}
|
||||
|
||||
if (disableSmoothScroll) {
|
||||
@@ -58,22 +61,34 @@ function init() {
|
||||
app.commandLine.appendSwitch("disable-background-timer-throttling");
|
||||
app.commandLine.appendSwitch("disable-backgrounding-occluded-windows");
|
||||
if (process.platform === "win32") {
|
||||
disabledFeatures.push("CalculateNativeWinOcclusion");
|
||||
disabledFeatures.add("CalculateNativeWinOcclusion");
|
||||
}
|
||||
|
||||
// work around chrome 66 disabling autoplay by default
|
||||
app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required");
|
||||
|
||||
// WinRetrieveSuggestionsOnlyOnDemand: Work around electron 13 bug w/ async spellchecking on Windows.
|
||||
// HardwareMediaKeyHandling,MediaSessionService: Prevent Discord from registering as a media service.
|
||||
//
|
||||
// WidgetLayering (Vencord Added): Fix DevTools context menus https://github.com/electron/electron/issues/38790
|
||||
disabledFeatures.push("WinRetrieveSuggestionsOnlyOnDemand", "HardwareMediaKeyHandling", "MediaSessionService");
|
||||
disabledFeatures.add("WinRetrieveSuggestionsOnlyOnDemand");
|
||||
disabledFeatures.add("HardwareMediaKeyHandling");
|
||||
disabledFeatures.add("MediaSessionService");
|
||||
|
||||
// Support TTS on Linux using speech-dispatcher
|
||||
app.commandLine.appendSwitch("enable-speech-dispatcher");
|
||||
if (isLinux) {
|
||||
// Support TTS on Linux using https://wiki.archlinux.org/title/Speech_dispatcher
|
||||
app.commandLine.appendSwitch("enable-speech-dispatcher");
|
||||
|
||||
app.commandLine.appendSwitch("enable-features", [...new Set(enabledFeatures)].filter(Boolean).join(","));
|
||||
app.commandLine.appendSwitch("disable-features", [...new Set(disabledFeatures)].filter(Boolean).join(","));
|
||||
// Work around Gtk-ERROR: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported
|
||||
// https://github.com/electron/electron/issues/46538
|
||||
// TODO: Remove this when upstream fixes it
|
||||
app.commandLine.appendSwitch("gtk-version", "3");
|
||||
}
|
||||
|
||||
disabledFeatures.forEach(feat => enabledFeatures.delete(feat));
|
||||
|
||||
app.commandLine.appendSwitch("enable-features", [...enabledFeatures].filter(Boolean).join(","));
|
||||
app.commandLine.appendSwitch("disable-features", [...disabledFeatures].filter(Boolean).join(","));
|
||||
|
||||
// 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";
|
||||
|
||||
Reference in New Issue
Block a user