On Mon, 08 Dec 2014 13:37:20 +0000 Paul via Digitalmars-d-learn <[email protected]> wrote:
> The program now works from a terminal as expected (!) BUT when
> SDL_RenderCopy is called SDL_GetError() shows an 'error code' (or
> just some address/value as it is different each time).
FYI: SDL_GetError() returns 'char*', not string. you can print error
message with this code, for example:
private void sdl_print_error () @trusted nothrow @nogc {
import core.stdc.stdio : stderr, fprintf;
auto sdl_error = SDL_GetError();
fprintf(stderr, "SDL ERROR: %s\n", sdl_error);
}
besides, i don't think that you'll get something sane from
`SDL_GetError()` in the case of segfault.
signature.asc
Description: PGP signature
