Anybody know about SDL and particularly SDL_TTF initialization?

solidstate1991 laszloszeremi at outlook.com
Fri Jun 7 23:11:24 UTC 2024


On Sunday, 12 May 2024 at 20:13:04 UTC, WhatMeWorry` wrote:
> This should be trivial, right?
> I've been looking at existing D repo code for hours. Can't 
> figure why TTF_Init doesn't work?
> It would help if I could figure out how to use SDL_GetError()
>
> INFO: SDL loaded v2.30.2
> INFO: SDL initialized: 0
> INFO: TTF loaded: v2.0.14
> Error Program exited with code -1073741819
>
>
>   loadSDL();
>   SDL_version v;
>   SDL_GetVersion(&v);
>   toStdout("SDL loaded v%d.%d.%d", v.major, v.minor, v.patch);
>   auto initSDL = SDL_Init(SDL_INIT_EVERYTHING);  // returns 0 
> on success
>   toStdout("SDL initialized: %d", initSDL);
>
>   auto loadTTF = loadSDLTTF();
>   SDL_TTF_VERSION(&v);
>   toStdout("TTF loaded: v%d.%d.%d", v.major, v.minor, v.patch);
>   auto initTTF = TTF_Init();  // SDL must be initialized before 
> calls to this library

I personally recommend using an alternative TTF library.


More information about the Digitalmars-d-learn mailing list