mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Add more logging
This commit is contained in:
parent
ff3a0d9a3c
commit
e5d930ae0a
33
deps/libui/win32/init.cpp
vendored
33
deps/libui/win32/init.cpp
vendored
@ -97,46 +97,79 @@ const char *uiInit(uiInitOptions *o)
|
||||
ZeroMemory(&ncm, sizeof (NONCLIENTMETRICSW));
|
||||
ncm.cbSize = sizeof (NONCLIENTMETRICSW);
|
||||
if (SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof (NONCLIENTMETRICSW), &ncm, sizeof (NONCLIENTMETRICSW)) == 0)
|
||||
{
|
||||
RARCH_ERR("Error getting default fonts.\n");
|
||||
return ieLastErr("getting default fonts");
|
||||
}
|
||||
hMessageFont = CreateFontIndirectW(&(ncm.lfMessageFont));
|
||||
if (hMessageFont == NULL)
|
||||
{
|
||||
RARCH_ERR("loading default messagebox font; this is the default UI font\n");
|
||||
return ieLastErr("loading default messagebox font; this is the default UI font");
|
||||
}
|
||||
|
||||
if (initContainer(hDefaultIcon, hDefaultCursor) == 0)
|
||||
{
|
||||
RARCH_ERR("initializing uiWindowsMakeContainer() window class\n");
|
||||
return ieLastErr("initializing uiWindowsMakeContainer() window class");
|
||||
}
|
||||
|
||||
hollowBrush = (HBRUSH) GetStockObject(HOLLOW_BRUSH);
|
||||
if (hollowBrush == NULL)
|
||||
{
|
||||
RARCH_ERR("getting hollow brush\n");
|
||||
return ieLastErr("getting hollow brush");
|
||||
}
|
||||
|
||||
ZeroMemory(&icc, sizeof (INITCOMMONCONTROLSEX));
|
||||
icc.dwSize = sizeof (INITCOMMONCONTROLSEX);
|
||||
icc.dwICC = wantedICCClasses;
|
||||
if (InitCommonControlsEx(&icc) == 0)
|
||||
{
|
||||
RARCH_ERR("initializing Common Controls\n");
|
||||
return ieLastErr("initializing Common Controls");
|
||||
}
|
||||
|
||||
hr = CoInitialize(NULL);
|
||||
if (hr != S_OK && hr != S_FALSE)
|
||||
{
|
||||
RARCH_ERR("initializing COM\n");
|
||||
return ieHRESULT("initializing COM", hr);
|
||||
}
|
||||
// LONGTERM initialize COM security
|
||||
// LONGTERM (windows vista) turn off COM exception handling
|
||||
|
||||
hr = initDraw();
|
||||
if (hr != S_OK)
|
||||
{
|
||||
RARCH_ERR("initializing Direct2D\n");
|
||||
return ieHRESULT("initializing Direct2D", hr);
|
||||
}
|
||||
|
||||
hr = initDrawText();
|
||||
if (hr != S_OK)
|
||||
{
|
||||
RARCH_ERR("initializing DirectWrite\n");
|
||||
return ieHRESULT("initializing DirectWrite", hr);
|
||||
}
|
||||
|
||||
if (registerAreaClass(hDefaultIcon, hDefaultCursor) == 0)
|
||||
{
|
||||
RARCH_ERR("registering uiArea window class\n");
|
||||
return ieLastErr("registering uiArea window class");
|
||||
}
|
||||
|
||||
if (registerMessageFilter() == 0)
|
||||
{
|
||||
RARCH_ERR("registering libui message filter\n");
|
||||
return ieLastErr("registering libui message filter");
|
||||
}
|
||||
|
||||
if (registerD2DScratchClass(hDefaultIcon, hDefaultCursor) == 0)
|
||||
{
|
||||
RARCH_ERR("initializing D2D scratch window class\n");
|
||||
return ieLastErr("initializing D2D scratch window class");
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user