Skip to content

Commit

Permalink
修改表现:忽略 GPU 黑名单选项现在可以在 Settings 内配置
Browse files Browse the repository at this point in the history
  • Loading branch information
iamapig120 committed Mar 26, 2019
1 parent da91d33 commit 7f03b87
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 34 deletions.
5 changes: 3 additions & 2 deletions configs-user.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"window": {
"OSTheme": "light",
"gameWindowSize":"",
"gameWindowSize": "",
"zoomFactor": 1,
"renderingMultiple": 100,
"isKioskModeOn": false,
Expand All @@ -13,7 +13,8 @@
},
"chromium": {
"isHardwareAccelerationDisable": false,
"isInProcessGpuOn": true
"isInProcessGpuOn": true,
"isIgnoreGpuBlacklist": false
},
"userData": {
"useAppdataLibrary": false
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/en-US/manager.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"chromium": "Core (Application restarting is required)",
"isHardwareAccelerationDisable": "Disable GPU acceleration",
"isInProcessGpuOn": "Enable GPU in-process ( Windows / macOS )",
"isIgnoreGpuBlacklist":"Ignore WebGL GPU Blacklist",
"isNoBorder": "Launch game with borderless window",
"userData": "User Data",
"isUseDefaultPath": "Use 'User Library'",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/ja-JP/manager.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ prerelease,获取浏览版更新,ブラウザのアップデート情報を取
chromium,核心(需重启软件),システム(アプリケーションの再起動が必要です)
isHardwareAccelerationDisable,关闭 GPU 硬件加速,GPUハードウェアアクセラレーションを無効にする
isInProcessGpuOn,启用进程内 GPU 处理,プロセス内でGPUによる処理を有効にする
isIgnoreGpuBlacklist,忽略 WebGL GPU 黑名单,
isNoBorder,使用无边框窗口进入游戏,ボーダーレスウインドウモードでゲームを開始する
userData,用户数据,ユーザーデータ
isUseDefaultPath,使用默认用户库目录,デフォルトのユーザーライブラリディレクトリを使用する
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/zh-CN/manager.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"chromium": "核心(需重启软件)",
"isHardwareAccelerationDisable": "关闭 GPU 硬件加速",
"isInProcessGpuOn": "启用进程内 GPU 处理 (Windows / macOS)",
"isIgnoreGpuBlacklist":"忽略 WebGL GPU 黑名单",
"isNoBorder": "使用无边框窗口进入游戏",
"userData": "用户数据",
"isUseDefaultPath": "使用默认用户库目录",
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ if (userConfigs.chromium.isInProcessGpuOn) {
break
}
}
if (userConfigs.chromium.isIgnoreGpuBlacklist) {
electronApp.commandLine.appendSwitch('ignore-gpu-blacklist')
}

const sererHttps = https.createServer(
{
Expand Down Expand Up @@ -105,7 +108,6 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'

server.get('*', Util.processRequest)

electronApp.commandLine.appendSwitch('ignore-gpu-blacklist')
electronApp.commandLine.appendSwitch('ignore-certificate-errors')
electronApp.commandLine.appendSwitch(
'autoplay-policy',
Expand Down
30 changes: 0 additions & 30 deletions manager/Setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,6 @@ class Settings {
this.save = this.save.bind(this)
}

// static _keyToTitle (key) {
// const map = {
// window: '窗口',
// zoomFactor: '资源管理器缩放(Zoom Factor)',
// gameSSAA: '超采样抗锯齿(SSAA)',
// renderingMultiple: '% 渲染比率(Rendering Multiple)',
// isKioskModeOn:
// '使用原生模式代替默认全屏幕模式(Use Kiosk Fullscreen Mode)',
// update: '更新',
// prerelease: '获取浏览版(Get Pre-releases)',
// chromium: '核心(需重启软件)',
// isHardwareAccelerationDisable:
// '关闭硬件加速(Turn Hardware Acceleration Off)',
// isInProcessGpuOn: '启用进程内GPU处理(Turn in-process-gpu On)',
// isNoBorder: '使用无边框窗口进入游戏(Turn BorderLess On)',
// localVersion: '雀魂Plus 当前版本'
// }
// return map[key] || key
// }

_getUserLocalConfig () {
const defaultConfigPath = path.join(__dirname, '../configs-user.json')
const defaultConfigJson = fs.readFileSync(defaultConfigPath)
Expand Down Expand Up @@ -150,16 +130,6 @@ class Settings {
})
}

// _renderVersionInfo () {
// const settingInner = document.getElementById('settingInner')
// const h3 = document.createElement('h3')
// h3.innerText = Settings._keyToTitle('localVersion')
// const p = document.createElement('p')
// p.innerText = app.getVersion()
// settingInner.append(h3)
// settingInner.append(p)
// }

_handleSaveConfigClick () {
this._saveConfig()
.then(() => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "majsoul-plus-client",
"version": "1.12.0-alpha.2",
"version": "1.12.0-alpha.3",
"productName": "Majsoul Plus",
"author": "MajsoulPlus Team",
"description": "Majsoul Plus",
Expand Down

0 comments on commit 7f03b87

Please sign in to comment.