Lines Matching refs:hwdata
403 haptic->hwdata = (struct haptic_hwdata *) in SDL_SYS_HapticOpenFromFD()
404 SDL_malloc(sizeof(*haptic->hwdata)); in SDL_SYS_HapticOpenFromFD()
405 if (haptic->hwdata == NULL) { in SDL_SYS_HapticOpenFromFD()
409 SDL_memset(haptic->hwdata, 0, sizeof(*haptic->hwdata)); in SDL_SYS_HapticOpenFromFD()
412 haptic->hwdata->fd = fd; in SDL_SYS_HapticOpenFromFD()
438 if (haptic->hwdata != NULL) { in SDL_SYS_HapticOpenFromFD()
439 SDL_free(haptic->hwdata); in SDL_SYS_HapticOpenFromFD()
440 haptic->hwdata = NULL; in SDL_SYS_HapticOpenFromFD()
471 haptic->hwdata->fname = SDL_strdup( item->fname ); in SDL_SYS_HapticOpen()
519 if (EV_IsHaptic(joystick->hwdata->fd)) { in SDL_SYS_JoystickIsHaptic()
539 if (SDL_strcmp(joystick->hwdata->fname, haptic->hwdata->fname) == 0) { in SDL_SYS_JoystickSameHaptic()
564 if (SDL_strcmp(item->fname, joystick->hwdata->fname) == 0) { in SDL_SYS_HapticOpenFromJoystick()
575 fd = open(joystick->hwdata->fname, O_RDWR, 0); in SDL_SYS_HapticOpenFromJoystick()
578 joystick->hwdata->fname, strerror(errno)); in SDL_SYS_HapticOpenFromJoystick()
585 haptic->hwdata->fname = SDL_strdup( joystick->hwdata->fname ); in SDL_SYS_HapticOpenFromJoystick()
600 if (haptic->hwdata) { in SDL_SYS_HapticClose()
608 close(haptic->hwdata->fd); in SDL_SYS_HapticClose()
611 SDL_free(haptic->hwdata->fname); in SDL_SYS_HapticClose()
612 SDL_free(haptic->hwdata); in SDL_SYS_HapticClose()
613 haptic->hwdata = NULL; in SDL_SYS_HapticClose()
972 if (ioctl(haptic->hwdata->fd, EVIOCSFF, linux_effect) < 0) { in SDL_SYS_HapticNewEffect()
1007 if (ioctl(haptic->hwdata->fd, EVIOCSFF, &linux_effect) < 0) { in SDL_SYS_HapticUpdateEffect()
1035 if (write(haptic->hwdata->fd, (const void *) &run, sizeof(run)) < 0) { in SDL_SYS_HapticRunEffect()
1055 if (write(haptic->hwdata->fd, (const void *) &stop, sizeof(stop)) < 0) { in SDL_SYS_HapticStopEffect()
1070 if (ioctl(haptic->hwdata->fd, EVIOCRMFF, effect->hweffect->effect.id) < 0) { in SDL_SYS_HapticDestroyEffect()
1093 if (write(haptic->hwdata->fd, &ie, sizeof(ie)) < 0) { in SDL_SYS_HapticGetEffectStatus()
1116 if (write(haptic->hwdata->fd, &ie, sizeof(ie)) < 0) { in SDL_SYS_HapticSetGain()
1136 if (write(haptic->hwdata->fd, &ie, sizeof(ie)) < 0) { in SDL_SYS_HapticSetAutocenter()