moved some stuff
This commit is contained in:
parent
e6c5c043c3
commit
a30297cfb7
2 changed files with 38 additions and 34 deletions
|
@ -3,6 +3,7 @@ const win = require('./base/win')
|
|||
|
||||
// Analytics for debugging.
|
||||
const ElectronSentry = require("@sentry/electron");
|
||||
const {app} = require("electron");
|
||||
ElectronSentry.init({dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214"});
|
||||
|
||||
module.exports = {
|
||||
|
@ -19,12 +20,43 @@ module.exports = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Initializes the main application (run before on-ready)
|
||||
*/
|
||||
Init() {
|
||||
* Initializes the main application (run before on-ready)
|
||||
*/
|
||||
async Init() {
|
||||
// Initialize the config.
|
||||
const {init} = require("./base/store");
|
||||
init()
|
||||
await init()
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Append Commandline Arguments
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
// Hardware Acceleration
|
||||
// Enable WebGPU and list adapters (EXPERIMENTAL.)
|
||||
// Note: THIS HAS TO BE BEFORE ANYTHING GETS INITIALIZED.
|
||||
switch (app.cfg.get("visual.hw_acceleration")) {
|
||||
default:
|
||||
case "default":
|
||||
|
||||
break;
|
||||
case "webgpu":
|
||||
console.info("WebGPU is enabled.");
|
||||
app.commandLine.appendSwitch('enable-unsafe-webgpu')
|
||||
break;
|
||||
case "disabled":
|
||||
console.info("Hardware acceleration is disabled.");
|
||||
app.commandLine.appendSwitch('disable-gpu')
|
||||
break;
|
||||
}
|
||||
|
||||
if (process.platform === "linux") {
|
||||
app.commandLine.appendSwitch('disable-features', 'MediaSessionService');
|
||||
}
|
||||
|
||||
app.commandLine.appendSwitch('high-dpi-support', 'true');
|
||||
app.commandLine.appendSwitch('force-device-scale-factor', '1');
|
||||
app.commandLine.appendSwitch('disable-pinch');
|
||||
app.commandLine.appendSwitch('js-flags', '--max-old-space-size=1024')
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue