mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-17 04:15:44 +00:00
ipc: Use u_winerror helper
This commit is contained in:
parent
6fc6968387
commit
8271d213f5
|
@ -13,6 +13,9 @@
|
|||
|
||||
#include "xrt/xrt_config_os.h"
|
||||
|
||||
#include "util/u_windows.h"
|
||||
#include "util/u_logging.h"
|
||||
|
||||
#include "shared/ipc_utils.h"
|
||||
#include "shared/ipc_protocol.h"
|
||||
|
||||
|
@ -21,10 +24,9 @@
|
|||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "util/u_logging.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Logging
|
||||
|
@ -41,10 +43,7 @@ const char *
|
|||
ipc_winerror(DWORD err)
|
||||
{
|
||||
static char s_buf[4096]; // N.B. Not thread-safe. If needed, use a thread var
|
||||
if (!FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, LANG_SYSTEM_DEFAULT, s_buf, sizeof(s_buf), NULL)) {
|
||||
s_buf[0] = 0;
|
||||
}
|
||||
return s_buf;
|
||||
return u_winerror(s_buf, sizeof(s_buf), err, false);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue