ref: 48935eb10d9f5538277574804c7c3cbbfb036ff8
parent: cc8e875cb12bbc9f7d6d21c41b4d8dc88a1e0536
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Jun 27 15:34:09 EDT 2020
Fix Windows builds when path contains accent char
--- a/src/Backends/Platform/SDL2.cpp
+++ b/src/Backends/Platform/SDL2.cpp
@@ -86,6 +86,13 @@
bool Backend_GetBasePath(char *string_buffer)
{
+#ifdef _WIN32
+ // SDL_GetBasePath returns a UTF-8 string, but Windows' fopen uses (extended?) ASCII.
+ // This is apparently a problem for accented characters, as they will make fopen fail.
+ // So, instead, we rely on argv[0], as that will put the accented characters in a
+ // format Windows will understand.
+ return false;
+#else
char *base_path = SDL_GetBasePath();
if (base_path == NULL)
return false;
@@ -97,6 +104,7 @@
SDL_free(base_path);
return true;
+#endif
}
void Backend_HideMouse(void)