mirror of
https://github.com/imsyy/SPlayer.git
synced 2025-11-25 03:14:57 +08:00
fix🐛: 修复了linux6.1内核下硬件加速被错误关闭的bug
This commit is contained in:
4
components.d.ts
vendored
4
components.d.ts
vendored
@@ -23,8 +23,8 @@ declare module 'vue' {
|
||||
KeyboardSetting: typeof import('./src/components/Setting/KeyboardSetting.vue')['default']
|
||||
LocalSetting: typeof import('./src/components/Setting/LocalSetting.vue')['default']
|
||||
Login: typeof import('./src/components/Modal/Login.vue')['default']
|
||||
LoginPhone: typeof import('./src/components/Modal/loginPhone.vue')['default']
|
||||
LoginQRCode: typeof import('./src/components/Modal/loginQRCode.vue')['default']
|
||||
LoginPhone: typeof import('./src/components/Modal/LoginPhone.vue')['default']
|
||||
LoginQRCode: typeof import('./src/components/Modal/LoginQRCode.vue')['default']
|
||||
LyricsSetting: typeof import('./src/components/Setting/LyricsSetting.vue')['default']
|
||||
MainAMLyric: typeof import('./src/components/Player/MainAMLyric.vue')['default']
|
||||
MainLyric: typeof import('./src/components/Player/MainLyric.vue')['default']
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { app, shell, BrowserWindow, BrowserWindowConstructorOptions } from "electron";
|
||||
import { electronApp, optimizer } from "@electron-toolkit/utils";
|
||||
import { join } from "path";
|
||||
import { release } from "os";
|
||||
import { release, type } from "os";
|
||||
import { isDev, isMac, appName } from "./utils";
|
||||
import { registerAllShortcuts, unregisterShortcuts } from "./shortcut";
|
||||
import { initTray, MainTray } from "./tray";
|
||||
@@ -38,7 +38,7 @@ class MainProcess {
|
||||
constructor() {
|
||||
log.info("🚀 Main process startup");
|
||||
// 禁用 Windows 7 的 GPU 加速功能
|
||||
if (release().startsWith("6.1")) app.disableHardwareAcceleration();
|
||||
if (release().startsWith("6.1") && type() == 'Windows_NT') app.disableHardwareAcceleration();
|
||||
// 单例锁
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
log.error("❌ There is already a program running and this process is terminated");
|
||||
|
||||
Reference in New Issue
Block a user