PPet
PPet copied to clipboard
开启gpu支持
cpu渲染风扇声太大,尝试开启gpu渲染有所好转。 系统:Kali GNU/Linux Rolling 源码为最新版本。 由于本人没学过相关内容,部分改动无法保证正确性:
diff --git a/src/main/index.ts b/src/main/index.ts
index 4089d20..ec172df 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -10,9 +10,11 @@ import { createWindow, winPagePathMap } from './window'
remoteMain.initialize()
+app.disableDomainBlockingFor3DAPIs()
+/*
const isWin7 = os.release().startsWith('6.1')
if (isWin7) app.disableHardwareAcceleration()
-
+*/
if (app.isPackaged) {
if (!app.requestSingleInstanceLock()) {
app.quit()
@@ -22,11 +24,11 @@ if (app.isPackaged) {
app.dock.hide()
}
}
-
+/*
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
app
修改后正常运行,cpu占用明显减少。
这个好
我在master分支上也没看见这个 文件的代码呀?你用的那个分支呀?
大佬你能帮我打包一个 deb 吗?我这运行不起来代码
好了 多打包几次就好了