From b59c3c87fea42211297e3cff29d87e5c8a1a37b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Thu, 9 Dec 2021 09:18:00 +0800 Subject: [PATCH] git status --- src/main/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/index.ts b/src/main/index.ts index 821c1d1..bd44a1a 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1,8 +1,11 @@ +import os from 'os' import { join } from 'path' import { app, BrowserWindow, ipcMain } from 'electron' import Store from 'electron-store' -app.disableHardwareAcceleration() +// https://stackoverflow.com/questions/42524606/how-to-get-windows-version-using-node-js +const isWin7 = os.release().startsWith('6.1') +if (isWin7) app.disableHardwareAcceleration() if (!app.requestSingleInstanceLock()) { app.quit()