Skip to content

Commit

Permalink
dx: don't check the OS version multiple times (#3480)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 authored and DHowett committed Nov 8, 2019
1 parent ddcc06e commit c274b38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/dx/CustomTextRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ using namespace Microsoft::Console::Render;

// First check if we want a color font and try to extract color emoji first.
// Color emoji are only available on Windows 10+
if (WI_IsFlagSet(drawingContext->options, D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT) && IsWindows10OrGreater())
static const bool s_isWindows10OrGreater = IsWindows10OrGreater();
if (WI_IsFlagSet(drawingContext->options, D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT) && s_isWindows10OrGreater)
{
::Microsoft::WRL::ComPtr<ID2D1DeviceContext4> d2dContext4;
RETURN_IF_FAILED(d2dContext.As(&d2dContext4));
Expand Down

0 comments on commit c274b38

Please sign in to comment.