mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-06 18:06:26 +00:00
Fixed Visual Studio warning 4244
This commit is contained in:
@@ -134,7 +134,7 @@ SDL_HapticOpen(int device_index)
|
||||
/* Initialize the haptic device */
|
||||
SDL_memset(haptic, 0, sizeof(*haptic));
|
||||
haptic->rumble_id = -1;
|
||||
haptic->index = device_index;
|
||||
haptic->index = (Uint8)device_index;
|
||||
if (SDL_SYS_HapticOpen(haptic) < 0) {
|
||||
SDL_free(haptic);
|
||||
return NULL;
|
||||
|
@@ -463,7 +463,7 @@ int SDL_DINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick)
|
||||
int SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick)
|
||||
{
|
||||
SDL_hapticlist_item *item;
|
||||
int index = 0;
|
||||
Uint8 index = 0;
|
||||
HRESULT ret;
|
||||
DIDEVICEINSTANCE joy_instance;
|
||||
|
||||
|
@@ -226,7 +226,7 @@ int SDL_XINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick)
|
||||
int SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick)
|
||||
{
|
||||
SDL_hapticlist_item *item;
|
||||
int index = 0;
|
||||
Uint8 index = 0;
|
||||
|
||||
/* Since it comes from a joystick we have to try to match it with a haptic device on our haptic list. */
|
||||
for (item = SDL_hapticlist; item != NULL; item = item->next) {
|
||||
|
Reference in New Issue
Block a user