Fix Windows builds when path contains accent char
This commit is contained in:
parent
cc8e875cb1
commit
48935eb10d
1 changed files with 8 additions and 0 deletions
|
@ -86,6 +86,13 @@ void Backend_PostWindowCreation(void)
|
|||
|
||||
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 @@ bool Backend_GetBasePath(char *string_buffer)
|
|||
SDL_free(base_path);
|
||||
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Backend_HideMouse(void)
|
||||
|
|
Loading…
Add table
Reference in a new issue