|
"System none" initialization on Allegro 5 |
Niunio
Member #1,975
March 2002
|
Good old Allegro 4 had AL_SYSTEM_NONE option when you want to use Allegro in text mode or GDI or xWindows. Is there something similar for Allegro 5? I'm looking for it but I cant find anything. Problem is that I started an editor, I want to use Allegro to manipulate some data so I can reuse some code from the game. But it raises an ugly SIGSEV from pthread_mutex_lock.c after initialising Allegro. I'm using Lazarus and seems that the system library conflicts with Allegro when it tries to deal with low-level OS stuff (open a GUI window). ----------------- |
Elias
Member #358
May 2000
|
I think it would be a good addition and should not be too hard to do. Maybe make it a config option, so you could do: al_set_config_value(al_get_system_config(), "system", "driver", "NONE"); al_init(); Only problem could be that even things like filesystem access are somewhat platform dependent, so may have to shuffle some things around a bit. -- |
Niunio
Member #1,975
March 2002
|
AFAIK, for filesystem it uses stdio stuff, doesn't it? May be Android or iOS needs some weird stuff but I think this feature wont be used in such platforms. For the API I think the version 4 way should be the best one. A collection of constants or an enum with several options. ----------------- |
MiquelFire
Member #3,110
January 2003
|
You could have non stdio stuff. My SpeedHack/TINS game template basically uses PhyFS. Also, there's a memfile thing that I haven't looked into. --- |
Niunio
Member #1,975
March 2002
|
PhyFS is an add-on. So if you don't initialize it, it won't be used. I'm asking about the Allegro core, and may be the image and codec add-ons. ----------------- |
SiegeLord
Member #7,827
October 2006
|
This seems like a niche enough feature to add a new version of al_install_system, e.g. al_install_system_none or w/e. I don't exactly know what is involved in this system none though, so somebody else needs to implement it. In particular, Allegro uses TLS pretty heavily inside pretty much everywhere, and that pthread crash might be TLS related. It might end up being a lot of work. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
|