Derelict / SDL error

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Dec 8 05:48:26 PST 2014


On 12/8/2014 10:37 PM, Paul wrote:

>
> I added this around the problem line to catch the problem:
>
>      try{
>          SDL_RenderCopy(renderer, texture, &sourceRect, &destRect);
>      } catch{}
>      finally {
>          writeln( "Error: " , SDL_GetError() );
>      }
>
> 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).

import std.conv : to;
writeln( "Error: ", to!string( SDL_GetError() ));



More information about the Digitalmars-d-learn mailing list