-
-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks !
} | ||
catch (Exception) { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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