Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
根据:issues
zenghongtu#148

解决cpu占用太高的bug
  • Loading branch information
crownclownwl authored Jun 18, 2024
1 parent 2185c3f commit ef2b3d2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { createWindow, winPagePathMap } from './window'

remoteMain.initialize()

const isWin7 = os.release().startsWith('6.1')
if (isWin7) app.disableHardwareAcceleration()
// const isWin7 = os.release().startsWith('6.1')
// if (isWin7) app.disableHardwareAcceleration()

if (app.isPackaged) {
if (!app.requestSingleInstanceLock()) {
Expand All @@ -23,9 +23,9 @@ if (app.isPackaged) {
}
}

app.commandLine.appendSwitch('disable-renderer-backgrounding')
app.commandLine.appendSwitch('disable-background-timer-throttling')
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required')
// app.commandLine.appendSwitch('disable-renderer-backgrounding')
// app.commandLine.appendSwitch('disable-background-timer-throttling')
// app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required')

let mainWindowState: windowStateKeeper.State

Expand Down

0 comments on commit ef2b3d2

Please sign in to comment.