Active Topics

 


Reply
Thread Tools
Posts: 1 | Thanked: 0 times | Joined on May 2010 @ Canada
#1
Hi there,

I just finished porting my game to Maemo using SDL, SDL_mixeroggwav and SDL_gles. It was a bit of a battle to make everything work right, but some perseverance and OS 1.2 fixed all my outstanding problems.

Now my game runs flawlessly, but I'd like to keep the screen on while it's running. I understand that I can call "osso_display_state_on" to ping the screen, stopping it from turning off, but I'm using SDL.

If I read correctly, libosso must be called, or your application will prematurely terminate. Seeing how that's not happening, I'm guessing libosso is being called behind the scenes by SDL. Also the docs say don't call osso_Initialize multiple times.

Is there any way to get access to SDL's instance of osso_context, or can anyone confirm SDL does not call any osso code?

Thanks,

Mike
 
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#2
SDL doesn't use libosso. Application is killed if osso_context is not created only if applicaiton is lauched via dbus (it has .service file).

So for osso_display_state_on function you can use libosso as documented, but if you want receive signals (use callbacks) you need to have glib mainloop running.
 
Posts: 631 | Thanked: 837 times | Joined on May 2007 @ Milton, Ontario, Canada
#3
Hey Mike,

As pointed out already there's no "automatic link" between SDL and libosso; you have to manually link in libosso to your app and initialize/call it as you need it. As already mentioned you can make libosso calls without having to use glib, but don't expect to be able to use any dbus/interprocess stuff as it will not work.

Although I use Glib mainloops in my SDL apps (I rely on DBus heavily), you can get away with just doing your libosso initialization as part of your main SDL setup; just remember to close it again when your app exists.
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:56.