mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 07:16:00 +00:00
Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
This commit is contained in:
@@ -416,6 +416,17 @@ SDL_strlen(const char *string)
|
||||
#endif /* HAVE_STRLEN */
|
||||
}
|
||||
|
||||
wchar_t *
|
||||
SDL_wcsdup(const wchar_t *string)
|
||||
{
|
||||
size_t len = ((SDL_wcslen(string) + 1) * sizeof(wchar_t));
|
||||
wchar_t *newstr = (wchar_t *)SDL_malloc(len);
|
||||
if (newstr) {
|
||||
SDL_memcpy(newstr, string, len);
|
||||
}
|
||||
return newstr;
|
||||
}
|
||||
|
||||
size_t
|
||||
SDL_wcslen(const wchar_t * string)
|
||||
{
|
||||
@@ -562,7 +573,7 @@ char *
|
||||
SDL_strdup(const char *string)
|
||||
{
|
||||
size_t len = SDL_strlen(string) + 1;
|
||||
char *newstr = SDL_malloc(len);
|
||||
char *newstr = (char *)SDL_malloc(len);
|
||||
if (newstr) {
|
||||
SDL_memcpy(newstr, string, len);
|
||||
}
|
||||
|
Reference in New Issue
Block a user