Merge branch 'main' of https://github.com/ciderapp/Cider
This commit is contained in:
commit
eca7d4c78b
1 changed files with 16 additions and 4 deletions
20
index.js
20
index.js
|
@ -5,6 +5,7 @@ const {app, components} = require('electron'),
|
||||||
|
|
||||||
const comps = components;
|
const comps = components;
|
||||||
|
|
||||||
|
|
||||||
// Analytics for debugging.
|
// Analytics for debugging.
|
||||||
const ElectronSentry = require("@sentry/electron");
|
const ElectronSentry = require("@sentry/electron");
|
||||||
ElectronSentry.init({dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214"});
|
ElectronSentry.init({dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214"});
|
||||||
|
@ -101,7 +102,15 @@ app.paths = {
|
||||||
switch (app.cfg.get("visual.hw_acceleration")) {
|
switch (app.cfg.get("visual.hw_acceleration")) {
|
||||||
default:
|
default:
|
||||||
case "default":
|
case "default":
|
||||||
|
app.commandLine.appendSwitch('enable-accelerated-mjpeg-decode')
|
||||||
|
app.commandLine.appendSwitch('enable-accelerated-video')
|
||||||
|
app.commandLine.appendSwitch('disable-gpu-driver-bug-workarounds')
|
||||||
|
app.commandLine.appendSwitch('ignore-gpu-blacklist')
|
||||||
|
app.commandLine.appendSwitch('enable-native-gpu-memory-buffers')
|
||||||
|
app.commandLine.appendSwitch('enable-accelerated-video-decode');
|
||||||
|
app.commandLine.appendSwitch('enable-gpu-rasterization');
|
||||||
|
app.commandLine.appendSwitch('enable-native-gpu-memory-buffers');
|
||||||
|
app.commandLine.appendSwitch('enable-oop-rasterization');
|
||||||
break;
|
break;
|
||||||
case "webgpu":
|
case "webgpu":
|
||||||
console.info("WebGPU is enabled.");
|
console.info("WebGPU is enabled.");
|
||||||
|
@ -130,9 +139,7 @@ function CreateWindow() {
|
||||||
if (process.platform === "linux") {
|
if (process.platform === "linux") {
|
||||||
app.commandLine.appendSwitch('disable-features', 'MediaSessionService');
|
app.commandLine.appendSwitch('disable-features', 'MediaSessionService');
|
||||||
}
|
}
|
||||||
app.commandLine.appendSwitch('high-dpi-support', "1")
|
|
||||||
app.commandLine.appendSwitch('force-device-scale-factor', "1")
|
|
||||||
app.commandLine.appendSwitch('disable-pinch');
|
|
||||||
app.commandLine.appendSwitch('no-sandbox');
|
app.commandLine.appendSwitch('no-sandbox');
|
||||||
// app.commandLine.appendSwitch('js-flags', '--max-old-space-size=1024')
|
// app.commandLine.appendSwitch('js-flags', '--max-old-space-size=1024')
|
||||||
|
|
||||||
|
@ -141,6 +148,11 @@ app.commandLine.appendSwitch('no-sandbox');
|
||||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
|
|
||||||
app.whenReady().then(async () => {
|
app.whenReady().then(async () => {
|
||||||
|
if (process.platform === "win32") {
|
||||||
|
app.commandLine.appendSwitch('high-dpi-support', 'true')
|
||||||
|
app.commandLine.appendSwitch('force-device-scale-factor', '1')
|
||||||
|
app.commandLine.appendSwitch('disable-pinch');
|
||||||
|
}
|
||||||
if (comps == null) {
|
if (comps == null) {
|
||||||
app.on("widevine-ready", () => {
|
app.on("widevine-ready", () => {
|
||||||
console.log('[Cider] Application is Ready. Creating Window.')
|
console.log('[Cider] Application is Ready. Creating Window.')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue