Prevent DirectWrite from being ON under Windows Sever (Core)
parent
3ee5ef0205
commit
6b441b738a
|
@ -19,6 +19,7 @@
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
|
#include <versionhelpers.h>
|
||||||
#include "ScintillaEditView.h"
|
#include "ScintillaEditView.h"
|
||||||
#include "Parameters.h"
|
#include "Parameters.h"
|
||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
|
@ -314,7 +315,8 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
||||||
if (hNtdllModule)
|
if (hNtdllModule)
|
||||||
isWINE = ::GetProcAddress(hNtdllModule, "wine_get_version");
|
isWINE = ::GetProcAddress(hNtdllModule, "wine_get_version");
|
||||||
|
|
||||||
if (isWINE) // There is a performance issue under WINE when DirectWright is ON, so we turn it off if user uses Notepad++ under WINE
|
if (isWINE || // There is a performance issue under WINE when DirectWrite is ON, so we turn it off if user uses Notepad++ under WINE
|
||||||
|
::IsWindowsServer()) // In the case of Windows Server Core, DirectWrite cannot be on.
|
||||||
nppGui._writeTechnologyEngine = defaultTechnology;
|
nppGui._writeTechnologyEngine = defaultTechnology;
|
||||||
|
|
||||||
if (nppGui._writeTechnologyEngine == directWriteTechnology)
|
if (nppGui._writeTechnologyEngine == directWriteTechnology)
|
||||||
|
|
Loading…
Reference in New Issue