mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 08:56:25 +00:00
use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2)
cf. bug #5435. - SDL_wasapi_win32.c (GetWasapiDeviceName): pwszVal is WCHAR* - windows/SDL_sysfilesystem.c (SDL_GetBasePath, SDL_GetPrefPath) - windows/SDL_sysurl.c (SDL_SYS_OpenURL): wurl is WCHAR* - SDL_windowssensor.c (ConnectSensor): bstr_name is WCHAR* - windows/SDL_systhread.c (SDL_SYS_SetupThread): strw is WCHAR*
This commit is contained in:
@@ -93,7 +93,7 @@ SDL_GetBasePath(void)
|
||||
SDL_assert(i > 0); /* Should have been an absolute path. */
|
||||
path[i+1] = '\0'; /* chop off filename. */
|
||||
|
||||
retval = WIN_StringToUTF8(path);
|
||||
retval = WIN_StringToUTF8W(path);
|
||||
SDL_free(path);
|
||||
|
||||
return retval;
|
||||
@@ -130,13 +130,13 @@ SDL_GetPrefPath(const char *org, const char *app)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
worg = WIN_UTF8ToString(org);
|
||||
worg = WIN_UTF8ToStringW(org);
|
||||
if (worg == NULL) {
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wapp = WIN_UTF8ToString(app);
|
||||
wapp = WIN_UTF8ToStringW(app);
|
||||
if (wapp == NULL) {
|
||||
SDL_free(worg);
|
||||
SDL_OutOfMemory();
|
||||
@@ -181,7 +181,7 @@ SDL_GetPrefPath(const char *org, const char *app)
|
||||
|
||||
lstrcatW(path, L"\\");
|
||||
|
||||
retval = WIN_StringToUTF8(path);
|
||||
retval = WIN_StringToUTF8W(path);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user