mirror of https://github.com/libsdl-org/SDL.git
Return the SDL_SetError value
This commit is contained in:
parent
a077cc8e4d
commit
6f0acca8bd
|
|
@ -485,8 +485,7 @@ static int SDL_SYS_HapticOpenFromService(SDL_Haptic *haptic, io_service_t servic
|
||||||
/* Open the device */
|
/* Open the device */
|
||||||
ret = FFCreateDevice(service, &haptic->hwdata->device);
|
ret = FFCreateDevice(service, &haptic->hwdata->device);
|
||||||
if (ret != FF_OK) {
|
if (ret != FF_OK) {
|
||||||
SDL_SetError("Haptic: Unable to create device from service: %s.",
|
SDL_SetError("Haptic: Unable to create device from service: %s.", FFStrError(ret));
|
||||||
FFStrError(ret));
|
|
||||||
goto creat_err;
|
goto creat_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1260,9 +1259,8 @@ int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic,
|
||||||
|
|
||||||
ret = FFEffectGetEffectStatus(effect->hweffect->ref, &status);
|
ret = FFEffectGetEffectStatus(effect->hweffect->ref, &status);
|
||||||
if (ret != FF_OK) {
|
if (ret != FF_OK) {
|
||||||
SDL_SetError("Haptic: Unable to get effect status: %s.",
|
return SDL_SetError("Haptic: Unable to get effect status: %s.",
|
||||||
FFStrError(ret));
|
FFStrError(ret));
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
|
|
|
||||||
|
|
@ -770,8 +770,7 @@ int SDL_GetDisplayIndex(SDL_DisplayID displayID)
|
||||||
return display_index;
|
return display_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SDL_SetError("Invalid display");
|
return SDL_SetError("Invalid display");
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_DisplayData *SDL_GetDisplayDriverData(SDL_DisplayID displayID)
|
SDL_DisplayData *SDL_GetDisplayDriverData(SDL_DisplayID displayID)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue