It seems that you are right ekeeke and henke37. I added if(scoret){SDL_FreeSurface(scoret);} in the loop just before the rendering, and now SDL makes no errors :-) Thank you very much to you all! By the way, before i read your solution i made my own system that can write 3 digit numbers to the screen. What a waste of time :-P At least it was fun writing, hehe.by andersers - Coding
by "initialize SDL to 24bit" you mean the bitsperpixel in SDL_SetVideoMode, right? I tried changing the value to 24, but it still fails.by andersers - Coding
I'm using sdl version Quotehttp://sdl-wii.googlecode.com/files/SDL%20Wii%2005-13-2009.zip http://sdl-wii.googlecode.com/files/SDL%20Wii%2005-13-2009.zip 05-13-2009 TTF_RenderText_Blended( font, buffer, textColor ); gives the same error.by andersers - Coding
Thank you very much, it helped somewhat. Now SDL only writes QuoteSDL_SetError: Out of memoryby andersers - Coding
Hi I have made a simple application, that counts how many times you press the A button, and writes it on the TV using sdl and sdl_ttf . Unfortunetly it only works for about 3 minutes, then SDL writes: QuoteSDL_SetError: Out of memory SDL_SetError: SDL_UpperBlit: passed a NULL surface Read source here I would like to know what I have done wrong. Thank youby andersers - Coding