Fix: Additional parameters dpiScaling

This commit is contained in:
LmeSzinc 2023-09-11 18:52:48 +08:00
parent 2b22fabf20
commit 7a6827ec8b

View File

@ -2,7 +2,7 @@ import {app, BrowserWindow} from 'electron';
import './security-restrictions';
import {createApp} from '/@/createApp';
import logger from '/@/logger';
import {noSandbox} from '/@/config';
import {dpiScaling} from '/@/config';
/**
* Prevent electron from running multiple instances.
@ -43,6 +43,12 @@ app.commandLine.appendSwitch('disable-gpu-sandbox');
app.commandLine.appendSwitch('in-process-gpu');
app.commandLine.appendSwitch('no-sandbox');
// No DPI scaling
if (!dpiScaling) {
app.commandLine.appendSwitch('high-dpi-support', '1');
app.commandLine.appendSwitch('force-device-scale-factor', '1');
}
/**
*Set App Error Log Path
*/