FZ: ZoneWindowDrawing is now properly initialized (#8836)

This commit is contained in:
Andrey Nekrasov
2020-12-31 00:47:18 +03:00
committed by GitHub
parent 8b8f87c7e8
commit 4aecabae47
3 changed files with 11 additions and 9 deletions

View File

@@ -6,6 +6,8 @@
#include <string>
#include <vector>
#include <common/logger/logger.h>
namespace NonLocalizable
{
const wchar_t SegoeUiFont[] = L"Segoe ui";
@@ -74,7 +76,7 @@ ZoneWindowDrawing::ZoneWindowDrawing(HWND window)
// Obtain the size of the drawing area.
if (!GetClientRect(window, &m_clientRect))
{
// TODO: Log failures and errors using spdlog
Logger::error("couldn't initialize ZoneWindowDrawing: GetClientRect failed");
return;
}
@@ -93,6 +95,7 @@ ZoneWindowDrawing::ZoneWindowDrawing(HWND window)
if (!SUCCEEDED(hr))
{
Logger::error("couldn't initialize ZoneWindowDrawing: CreateHwndRenderTarget failed with {}", hr);
return;
}