mirror of
https://github.com/yuzu-emu/discord-rpc
synced 2024-11-22 12:43:34 +00:00
wchar.h instead cwchar when compiler is MinGW to prevent weird behavior with vsnwprintf (#277)
This commit is contained in:
parent
eff23a770a
commit
b6d0a9cdbd
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,6 @@
|
||||||
#define NOIME
|
#define NOIME
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <psapi.h>
|
#include <psapi.h>
|
||||||
#include <cwchar>
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,6 +19,7 @@
|
||||||
* The entire function is rewritten
|
* The entire function is rewritten
|
||||||
*/
|
*/
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
|
#include <wchar.h>
|
||||||
/// strsafe.h fixes
|
/// strsafe.h fixes
|
||||||
static HRESULT StringCbPrintfW(LPWSTR pszDest, size_t cbDest, LPCWSTR pszFormat, ...)
|
static HRESULT StringCbPrintfW(LPWSTR pszDest, size_t cbDest, LPCWSTR pszFormat, ...)
|
||||||
{
|
{
|
||||||
|
@ -34,6 +34,7 @@ static HRESULT StringCbPrintfW(LPWSTR pszDest, size_t cbDest, LPCWSTR pszFormat,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
#include <cwchar>
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
#endif // __MINGW32__
|
#endif // __MINGW32__
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue