Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Make SDL_SetError and friends unconditionally return -1.

This lets us change things like this...

    if (Failed) {
        SDL_SetError("We failed");
        return -1;
    }

...into this...

    if (Failed) {
        return SDL_SetError("We failed");
    }


 Fixes Bugzilla #1778.
  • Loading branch information
icculus committed Mar 31, 2013
1 parent a979ef0 commit 8163efd819129d1a40afcfee5696c42e41252b35

File 81 of 106 in 8163efd

@@ -176,8 +176,7 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window)
int
DirectFB_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
{
SDL_Unsupported();
return -1;
return SDL_Unsupported();
}

void
@@ -188,8 +187,9 @@ DirectFB_SetWindowTitle(_THIS, SDL_Window * window)
if (windata->is_managed) {
windata->wm_needs_redraw = 1;
DirectFB_WM_RedrawLayout(_this, window);
} else
} else {
SDL_Unsupported();
}
}

void

0 comments on commit 8163efd

Please sign in to comment.