mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 10:14:13 -05:00
libobs-d3d11: Convert monitor name to UTF-8 for logging
This commit is contained in:
committed by
Ryan Foster
parent
50338afe51
commit
150124038b
@@ -1287,9 +1287,14 @@ static inline void LogAdapterMonitors(IDXGIAdapter1 *adapter)
|
|||||||
|
|
||||||
const RECT &rect = desc.DesktopCoordinates;
|
const RECT &rect = desc.DesktopCoordinates;
|
||||||
const ULONG nits = GetSdrWhiteNits(desc.Monitor);
|
const ULONG nits = GetSdrWhiteNits(desc.Monitor);
|
||||||
|
|
||||||
|
char *friendly_name;
|
||||||
|
os_wcs_to_utf8_ptr(target.monitorFriendlyDeviceName, 0,
|
||||||
|
&friendly_name);
|
||||||
|
|
||||||
blog(LOG_INFO,
|
blog(LOG_INFO,
|
||||||
"\t output %u:\n"
|
"\t output %u:\n"
|
||||||
"\t name=%ls\n"
|
"\t name=%s\n"
|
||||||
"\t pos={%d, %d}\n"
|
"\t pos={%d, %d}\n"
|
||||||
"\t size={%d, %d}\n"
|
"\t size={%d, %d}\n"
|
||||||
"\t attached=%s\n"
|
"\t attached=%s\n"
|
||||||
@@ -1301,11 +1306,12 @@ static inline void LogAdapterMonitors(IDXGIAdapter1 *adapter)
|
|||||||
"\t dpi=%u (%u%%)\n"
|
"\t dpi=%u (%u%%)\n"
|
||||||
"\t id=%s\n"
|
"\t id=%s\n"
|
||||||
"\t alt_id=%s",
|
"\t alt_id=%s",
|
||||||
i, target.monitorFriendlyDeviceName, rect.left, rect.top,
|
i, friendly_name, rect.left, rect.top,
|
||||||
rect.right - rect.left, rect.bottom - rect.top,
|
rect.right - rect.left, rect.bottom - rect.top,
|
||||||
desc.AttachedToDesktop ? "true" : "false", refresh,
|
desc.AttachedToDesktop ? "true" : "false", refresh,
|
||||||
bits_per_color, space, nits, min_luminance, max_luminance,
|
bits_per_color, space, nits, min_luminance, max_luminance,
|
||||||
max_full_frame_luminance, dpiX, scaling, id, alt_id);
|
max_full_frame_luminance, dpiX, scaling, id, alt_id);
|
||||||
|
bfree(friendly_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user