Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » "System none" initialization on Allegro 5

This thread is locked; no one can reply to it. rss feed Print
"System none" initialization on Allegro 5
Niunio
Member #1,975
March 2002
avatar

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).

-----------------
Current projects: Allegro.pas | MinGRo

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.

--
"Either help out or stop whining" - Evert

Niunio
Member #1,975
March 2002
avatar

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.

-----------------
Current projects: Allegro.pas | MinGRo

MiquelFire
Member #3,110
January 2003
avatar

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.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red | +Me
Windows 8 is a toned, stylish, polished professional athlete. But it’s wearing clown makeup, and that creates a serious image problem. ~PCWorld Article

Niunio
Member #1,975
March 2002
avatar

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.

-----------------
Current projects: Allegro.pas | MinGRo

SiegeLord
Member #7,827
October 2006
avatar

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
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Go to: