Mac and Linux SDL2 binary snapshots
Edward Rudd
2021-06-15 dec7875a6e23212021e4d9080330a42832dfe02a
source/src/haptic/windows/SDL_dinputhaptic.c
@@ -51,10 +51,6 @@
static int
DI_SetError(const char *str, HRESULT err)
{
    /*
       SDL_SetError("Haptic: %s - %s: %s", str,
       DXGetErrorString8A(err), DXGetErrorDescription8A(err));
     */
    return SDL_SetError("Haptic error %s", str);
}
@@ -87,7 +83,7 @@
    coinitialized = SDL_TRUE;
    ret = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER,
        &IID_IDirectInput8, (LPVOID)& dinput);
        &IID_IDirectInput8, (LPVOID *) &dinput);
    if (FAILED(ret)) {
        SDL_SYS_HapticQuit();
        return DI_SetError("CoCreateInstance", ret);
@@ -589,6 +585,10 @@
        if (naxes > 2)
            rglDir[2] = dir->dir[2];
        return 0;
    case SDL_HAPTIC_STEERING_AXIS:
        effect->dwFlags |= DIEFF_CARTESIAN;
        rglDir[0] = 0;
        return 0;
    default:
        return SDL_SetError("Haptic: Unknown direction type.");
@@ -637,7 +637,11 @@
    envelope->dwSize = sizeof(DIENVELOPE);      /* Always should be this. */
    /* Axes. */
    dest->cAxes = haptic->naxes;
    if (src->constant.direction.type == SDL_HAPTIC_STEERING_AXIS) {
        dest->cAxes = 1;
    } else {
        dest->cAxes = haptic->naxes;
    }
    if (dest->cAxes > 0) {
        axes = SDL_malloc(sizeof(DWORD) * dest->cAxes);
        if (axes == NULL) {