Windows: log more descriptive errors

This commit is contained in:
Megamouse 2023-03-04 11:05:32 +01:00
parent 8409979dc5
commit 92ae57c9ee
8 changed files with 28 additions and 10 deletions

View file

@ -54,9 +54,9 @@ LOG_CHANNEL(perf_log, "PERF");
namespace utils
{
#ifdef _WIN32
std::string pdh_error(PDH_STATUS status)
fmt::win_error pdh_error(PDH_STATUS status)
{
return fmt::win_error_to_string(status, LoadLibrary(L"pdh.dll"));
return fmt::win_error{static_cast<unsigned long>(status), LoadLibrary(L"pdh.dll")};
}
#endif