Fix a crash when dragging a debug conhost across a DPI boundary (#4022)
## Summary of the Pull Request When dragging _DEBUG_ conhost across a DPI boundary, we'd crash. This doesn't repro for some reason on Release builds. Maybe @miniksa can share some light why that is. ## PR Checklist * [x] Closes #4012 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed Dragged it across the boundary again, doesn't crash anymore 🙏
This commit is contained in:
parent
052e510694
commit
f467422912
|
@ -185,7 +185,7 @@ using namespace Microsoft::Console::Types;
|
|||
// Now we need to get what the font size *would be* if we had this new DPI. We need to ask the renderer about that.
|
||||
const FontInfo& fiCurrent = ScreenInfo.GetCurrentFont();
|
||||
FontInfoDesired fiDesired(fiCurrent);
|
||||
FontInfo fiProposed(nullptr, 0, 0, { 0, 0 }, 0);
|
||||
FontInfo fiProposed(L"", 0, 0, { 0, 0 }, 0);
|
||||
|
||||
const HRESULT hr = g.pRender->GetProposedFont(dpiProposed, fiDesired, fiProposed);
|
||||
// fiProposal will be updated by the renderer for this new font.
|
||||
|
|
Loading…
Reference in a new issue