Skip to content

Commit

Permalink
Merge pull request #146 from jcfun/dev
Browse files Browse the repository at this point in the history
修复了linux6.1*内核下硬件加速被错误关闭的bug
  • Loading branch information
Sherlockouo authored Oct 8, 2024
2 parents 8ae9115 + 3fa1681 commit dc20e3b
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 dc20e3b

Please sign in to comment.