Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

SDL2 | SDL_TTF Errors

Kilian edited this page Mar 18, 2020 · 1 revision
  • 2 : E_SDL_INIT

As stated in the API Documentation of SDL_Init(), which is the function used to enable a connexion between our program and SDL2, several errors can occur during this process. If so, connexion to the API isn't made and the program can't use it afterwards.

  • 3 : E_SDL_WIN

As stated in the API Documentation of SDL_CreateWindow(), which is the function used to create a window and get its address, this process can fail. If so, the program can't have a graphic output.

  • 4 : E_SDL_WINSURF

As stated in the API Documentation of SDL_GetWindowSurface(), which is the function to retrieve the address of window's screen data (colors), this process can fail. If so, the program can't access to the screen data either to modify or display it.

  • 5 : E_SDL_UPDATE

As stated in the API Documentation of SDL_UpdateWindowSurface(), which is the function to reflect any changes to the surface on the screen, this process can fail. If so, the screen isn't updated and the last surface changes are possibly lost.

  • 6 : E_TTF_INIT

As stated in the API Documentation of TTF_Init(), which is the function used to enable a connexion between our program and SDL2_TTF, several errors can occur during this process. If so connexion to the API isn't made and the program can't use it afterwards.

  • 7 : E_TTF_FONT

As stated in the API Documentation of TTF_OpenFont(), which is the function to load a True Type Font (.ttf) to write the requested text using its atlas, this process can fail. If so, the font can't be used to write text.

  • 8 : E_TTF_RENDER

As stated in the API Documentation of TTF_RenderText_Blended(), which is the function to write text on a surface, this process can fail. If so, the requested text isn't copied on a surface and can't be pasted on the screen afterwards.

  • 9 : E_SDL_BLIT

As stated in the API Documentation of SDL_BlitSurface(), which is the function to copy data from one surface to another from a given offset, this process can fail. If so, data isn't pasted on the main surface and is definitely lost.

Clone this wiki locally