Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Starward/Features/GameSetting/GameSettingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private async Task InitializeGameSettingAsync()
{
IsGraphicsSettingEnable = true;
StackPanel_GenshinHDR.Visibility = Visibility.Visible;
EnableGenshinHDR = AppConfig.EnableGenshinHDR;
EnableGenshinHDR = GameSettingService.GetGenshinEnableHDR(CurrentGameBiz) ?? AppConfig.EnableGenshinHDR;
_displayInformation = DisplayInformation.CreateForWindowId(this.XamlRoot.GetAppWindow().Id);
_displayInformation.AdvancedColorInfoChanged += _displayInformation_AdvancedColorInfoChanged;
UpdateHdrState(_displayInformation);
Expand Down
17 changes: 17 additions & 0 deletions src/Starward/Features/GameSetting/GameSettingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,23 @@ public static void SetGenshinEnableHDR(GameBiz biz, bool enableHDR)



public static bool? GetGenshinEnableHDR(GameBiz biz)
{
if (biz.Game is GameBiz.hk4e)
{
try
{
string key = biz.GetGameRegistryKey();
return Registry.GetValue(key, WINDOWS_HDR_ON_h3132281285, null) as int? is int v and not 0;
}
catch
{
return null;
}
}
return null;
}



public static (int MaxLuminance, int SceneLuminance, int UILuminance) GetGenshinHDRLuminance(GameBiz biz)
Expand Down
Loading