Skip to content

Commit

Permalink
修复了linux6.1*内核下硬件加速被错误关闭的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfun committed Oct 4, 2024
1 parent a477b57 commit 3fa1681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/desktop/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
BrowserWindowConstructorOptions,
shell,
} from 'electron'
import { release } from 'os'
import { release, type } from 'os'
import { join } from 'path'
import log from './log'
import { initIpcMain, lyricWin } from './ipcMain'
Expand All @@ -33,7 +33,7 @@ class Main {
constructor() {
log.info('[index] Main process start')
// Disable GPU Acceleration for Windows 7
if (release().startsWith('6.1')) app.disableHardwareAcceleration()
if (release().startsWith('6.1') && type() == 'Windows_NT') app.disableHardwareAcceleration()

// Set application name for Windows 10+ notifications
if (process.platform === 'win32') app.setAppUserModelId(app.getName())
Expand Down

0 comments on commit 3fa1681

Please sign in to comment.