Merge pull request #218 from fxeP1/main

Implement Direct3D10 rendering mode.
This commit is contained in:
pizzaboxer 2023-05-07 07:53:17 +01:00 committed by GitHub
commit 51ff6680e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View File

@ -20,6 +20,7 @@ namespace Bloxstrap.Singletons
{ {
{ "Automatic", "" }, { "Automatic", "" },
{ "Direct3D 11", "FFlagDebugGraphicsPreferD3D11" }, { "Direct3D 11", "FFlagDebugGraphicsPreferD3D11" },
{ "Direct3D 10", "FFlagDebugGraphicsPreferD3D11FL10" },
{ "Vulkan", "FFlagDebugGraphicsPreferVulkan" }, { "Vulkan", "FFlagDebugGraphicsPreferVulkan" },
{ "OpenGL", "FFlagDebugGraphicsPreferOpenGL" } { "OpenGL", "FFlagDebugGraphicsPreferOpenGL" }
}; };
@ -120,9 +121,14 @@ namespace Bloxstrap.Singletons
if (GetValue("DFIntTaskSchedulerTargetFps") is null) if (GetValue("DFIntTaskSchedulerTargetFps") is null)
SetValue("DFIntTaskSchedulerTargetFps", 9999); SetValue("DFIntTaskSchedulerTargetFps", 9999);
// reshade / exclusive fullscreen requires direct3d 11 to work // exclusive fullscreen requires direct3d 10/11 to work
if (GetValue(RenderingModes["Direct3D 11"]) != "True" && App.FastFlags.GetValue("FFlagHandleAltEnterFullscreenManually") == "False") if (App.FastFlags.GetValue("FFlagHandleAltEnterFullscreenManually") == "False")
SetRenderingMode("Direct3D 11"); {
if (!(App.FastFlags.GetValue("FFlagDebugGraphicsPreferD3D11") == "True" || App.FastFlags.GetValue("FFlagDebugGraphicsPreferD3D11FL10") == "True"))
{
SetRenderingMode("Direct3D 11");
}
}
} }
public override void Save() public override void Save()

View File

@ -53,7 +53,11 @@ namespace Bloxstrap.ViewModels
if (value) if (value)
{ {
App.FastFlags.SetRenderingMode("Direct3D 11"); if (!(App.FastFlags.GetValue("FFlagDebugGraphicsPreferD3D11") == "True" || App.FastFlags.GetValue("FFlagDebugGraphicsPreferD3D11FL10") == "True"))
{
App.FastFlags.SetRenderingMode("Direct3D 11");
}
OnPropertyChanged(nameof(SelectedRenderingMode)); OnPropertyChanged(nameof(SelectedRenderingMode));
} }
} }

View File

@ -65,7 +65,7 @@
<ui:CardControl.Header> <ui:CardControl.Header>
<StackPanel> <StackPanel>
<TextBlock FontSize="14" Text="Enable exclusive fullscreen" /> <TextBlock FontSize="14" Text="Enable exclusive fullscreen" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Enables using Alt + Enter to enter exclusive fullscreen. Only works with Direct3D 11." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> <TextBlock Margin="0,2,0,0" FontSize="12" Text="Enables using Alt + Enter to enter exclusive fullscreen. Only works with Direct3D." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel> </StackPanel>
</ui:CardControl.Header> </ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding ExclusiveFullscreenEnabled, Mode=TwoWay}" /> <ui:ToggleSwitch IsChecked="{Binding ExclusiveFullscreenEnabled, Mode=TwoWay}" />