Fixed getting actual bounds and refresh rate of the output (monitor/display) from GraphicsOutput.CurrentDisplayMode when using Direct3D#2494
Conversation
…isplay) from GraphicsOutput.CurrentDisplayMode when using Direct3D
@dotnet-policy-service agree |
| // about the current display/monitor mode and not the supported display mode for the specific graphics profile | ||
| deviceTemp = new SharpDX.Direct3D11.Device(adapter.NativeAdapter); | ||
| } | ||
| catch (Exception) { } |
There was a problem hiding this comment.
In which case would it throw ? Might be best to still log it, perhaps through a global logger for this class;
private static readonly Logger Log = GlobalLogger.GetLogger(typeof(GraphicsOutput).FullName);There was a problem hiding this comment.
It's a good idea, to be honest I don't know exactly in which cases it might throw, I followed the steps taken from FindClosestMatchingDisplayMode in the same file.
|
Actually, you might want to change stride/sources/engine/Stride.Graphics/Direct3D/GraphicsOutput.Direct3D.cs Lines 194 to 198 in 256c47b So, TryFindMatchingDisplayMode should return null if the format doesn't match for that logic to work
|
|
Thanks ! |
|
You're welcome! |
PR Details
Fix for the bug #2492.
References:
Related Issue
Types of changes
Checklist