mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Misc: Windows: Do not use _wfopen() if IMGUI_DISABLE_WIN32_FUNCTIONS is defined. (#2815)
This commit is contained in:
parent
6bf5aed325
commit
d62a413476
2 changed files with 2 additions and 1 deletions
|
|
@ -1363,7 +1363,7 @@ ImU32 ImHashStr(const char* data_p, size_t data_size, ImU32 seed)
|
|||
|
||||
FILE* ImFileOpen(const char* filename, const char* mode)
|
||||
{
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__GNUC__)
|
||||
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(__CYGWIN__) && !defined(__GNUC__)
|
||||
// We need a fopen() wrapper because MSVC/Windows fopen doesn't handle UTF-8 filenames. Converting both strings from UTF-8 to wchar format (using a single allocation, because we can)
|
||||
const int filename_wsize = ImTextCountCharsFromUtf8(filename, NULL) + 1;
|
||||
const int mode_wsize = ImTextCountCharsFromUtf8(mode, NULL) + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue