Skip to content

Commit a815183

Browse files
committed
update
1 parent 6cf757e commit a815183

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

HMCL/src/main/java/org/jackhuang/hmcl/setting/Config.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,21 @@ public void setDisableAutoGameOptions(boolean disableAutoGameOptions) {
659659
this.disableAutoGameOptions.set(disableAutoGameOptions);
660660
}
661661

662+
@SerializedName("windowsHighPerformance")
663+
private final BooleanProperty windowsHighPerformance = new SimpleBooleanProperty(false);
664+
665+
public BooleanProperty windowsHighPerformanceProperty() {
666+
return windowsHighPerformance;
667+
}
668+
669+
public boolean iswindowsHighPerformance() {
670+
return windowsHighPerformance.get();
671+
}
672+
673+
public void setwindowsHighPerformance(boolean windowsHighPerformance) {
674+
this.windowsHighPerformance.set(windowsHighPerformance);
675+
}
676+
662677
// Accounts
663678

664679
@SerializedName("authlibInjectorServers")

HMCL/src/main/java/org/jackhuang/hmcl/ui/main/SettingsPage.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,14 @@ else if (locale.isSameLanguage(currentLocale))
272272
settingsPane.getContent().add(disableAutoGameOptionsPane);
273273
}
274274

275+
{
276+
LineToggleButton windowsHighPerformance = new LineToggleButton();
277+
windowsHighPerformance.setTitle(i18n("settings.launcher.windows_gpu_preferences"));
278+
windowsHighPerformance.selectedProperty().bindBidirectional(config().windowsHighPerformanceProperty());
279+
280+
settingsPane.getContent().add(windowsHighPerformance);
281+
}
282+
275283
{
276284
BorderPane debugPane = new BorderPane();
277285

HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,7 @@ settings.launcher.brightness.light=浅色模式
11981198
settings.launcher.common_path.tooltip=启动器将所有游戏资源及依赖库文件存放于此集中管理。如果游戏文件夹内有现成的将不会使用公共库文件。
11991199
settings.launcher.debug=调试
12001200
settings.launcher.disable_auto_game_options=不自动切换游戏语言
1201+
settings.launcher.windows_gpu_preferences=[Windows] 自动使用高性能 GPU 启动游戏
12011202
settings.launcher.download=下载
12021203
settings.launcher.download.threads=线程数
12031204
settings.launcher.download.threads.auto=自动选择线程数

0 commit comments

Comments
 (0)