Simplify Direct2D DLLs loading code a little.
Bail out earlier: if d2d1.dll is not there, it doesn't make sense to try to load dwrite.dll. Also use Load() return value directly instead of ignoring it and then checking for IsLoaded(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -128,12 +128,10 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool LoadLibraries()
|
static bool LoadLibraries()
|
||||||
{
|
{
|
||||||
m_dllDirect2d.Load(wxT("d2d1.dll"), wxDL_VERBATIM | wxDL_QUIET);
|
if ( !m_dllDirect2d.Load(wxT("d2d1.dll"), wxDL_VERBATIM | wxDL_QUIET) )
|
||||||
m_dllDirectWrite.Load(wxT("dwrite.dll"), wxDL_VERBATIM | wxDL_QUIET);
|
return false;
|
||||||
|
|
||||||
bool hasDirect2dSupport = m_dllDirect2d.IsLoaded() && m_dllDirectWrite.IsLoaded();
|
if ( !m_dllDirectWrite.Load(wxT("dwrite.dll"), wxDL_VERBATIM | wxDL_QUIET) )
|
||||||
|
|
||||||
if (!hasDirect2dSupport)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#define wxLOAD_FUNC(dll, name) \
|
#define wxLOAD_FUNC(dll, name) \
|
||||||
|
Reference in New Issue
Block a user