mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +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:
@@ -37,7 +37,7 @@ SDL_SYS_OpenURL(const char *url)
|
||||
return WIN_SetErrorFromHRESULT("CoInitialize failed", hr);
|
||||
}
|
||||
|
||||
wurl = WIN_UTF8ToString(url);
|
||||
wurl = WIN_UTF8ToStringW(url);
|
||||
if (wurl == NULL) {
|
||||
WIN_CoUninitialize();
|
||||
return SDL_OutOfMemory();
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
#include "../SDL_sysurl.h"
|
||||
@@ -27,7 +26,7 @@
|
||||
int
|
||||
SDL_SYS_OpenURL(const char *url)
|
||||
{
|
||||
WCHAR *wurl = WIN_UTF8ToString(url);
|
||||
WCHAR *wurl = WIN_UTF8ToStringW(url);
|
||||
if (!wurl) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user