mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-31 20:16:36 +08:00
feat: disableHardwareAcceleration on windows 7
This commit is contained in:
parent
b2a2aa5388
commit
874b06ccde
@ -1,6 +1,11 @@
|
||||
import os from 'os'
|
||||
import path from 'path'
|
||||
import { app, BrowserWindow } from 'electron'
|
||||
|
||||
// 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()
|
||||
process.exit(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user