mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 05:01:05 +01:00 
			
		
		
		
	ImFileOpen: MinGW uses _wfopen() codepath to support UTF-8 filenames (#917)
This commit is contained in:
		| @@ -1295,7 +1295,7 @@ void ImGui::ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& | |||||||
|  |  | ||||||
| FILE* ImFileOpen(const char* filename, const char* mode) | FILE* ImFileOpen(const char* filename, const char* mode) | ||||||
| { | { | ||||||
| #ifdef _MSC_VER | #if defined(_WIN32) && !defined(__CYGWIN__) | ||||||
|     // 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) |     // 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 filename_wsize = ImTextCountCharsFromUtf8(filename, NULL) + 1; | ||||||
|     const int mode_wsize = ImTextCountCharsFromUtf8(mode, NULL) + 1; |     const int mode_wsize = ImTextCountCharsFromUtf8(mode, NULL) + 1; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user