Skip to content

Instantly share code, notes, and snippets.

View ManDude's full-sized avatar

Alex ManDude

  • Portugal
  • 14:02 (UTC)
View GitHub Profile
void win_print_last_error(const std::string& msg) {
LPSTR lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&lpMsgBuf, 0, NULL);
lg::error("[OpenGLRenderer] {} Win Err: {}", msg, lpMsgBuf);
}