high dpi detection

This commit is contained in:
booploops 2021-12-26 23:47:33 -08:00
parent f8b4827cf2
commit 997847e146
3 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,5 @@
require('v8-compile-cache');
const { app } = require('electron');
const { app, screen } = require('electron');
// Analytics for debugging.
const ElectronSentry = require("@sentry/electron");
@ -61,7 +61,6 @@ switch (app.cfg.get("visual.hw_acceleration")) {
break;
}
// Creating the Application Window and Calling all the Functions
function CreateWindow() {
if (app.isQuiting) { app.quit(); return; }
@ -82,6 +81,9 @@ app.commandLine.appendSwitch('js-flags', '--max-old-space-size=1024')
app.on('ready', () => {
if (app.isQuiting) { app.quit(); return; }
app.commandLine.appendSwitch('high-dpi-support', 1)
app.commandLine.appendSwitch('force-device-scale-factor', 1)
console.log('[Cider] Application is Ready. Creating Window.')
if (!app.isPackaged) {
console.info('[Cider] Running in development mode.')