Dingoonity.org

Dingux (Dingoo Linux) => Development => Topic started by: DiegoSLTS on October 08, 2012, 12:50:09 am

Title: Does SDL_TTF work in OD?
Post by: DiegoSLTS on October 08, 2012, 12:50:09 am
I'm trying to use SDL_TTF but it's not working.

First of all, the code works perfect on my Ubuntu, then I build it for OD (with the same flags for the compiler) and the text doesn't show on screen.

They're used in a menu, there's also a cursor that shows OK, but it's made with SDL functions.

The SDL_TTF library isn't giving me any errors, the font I'm using is FreeMono.ttf, on a /res folder. Should I use OD fonts from a system folder? Where are they? I've searched through the folders but found nothing.

If noone knows that, can you name an opensource emulator/game for OD that uses them so I can check it?
Title: Re: Does SDL_TTF work in OD?
Post by: DiegoSLTS on October 08, 2012, 05:08:57 am
Nevermind, it had nothing to do with SDL_TTF. It looks like SDL_BlitSurface can't be used on a locked surface in OD, everything works fine now.
Title: Re: Does SDL_TTF work in OD?
Post by: pcercuei on October 08, 2012, 05:20:39 am
Locking the surface is useful only when you make explicit use of its "pixel" pointer. To perform other operations, you should have it unlocked.
Title: Re: Does SDL_TTF work in OD?
Post by: clach04 on October 13, 2012, 06:30:27 am
...
If noone knows that, can you name an opensource emulator/game for OD that uses them so I can check it?

I know I'm late to this but just in case anyone else wants a demo check out https://bitbucket.org/clach04/sdl_keycodes (OhBoy also has the option to use TTF or bitmap fonts).