Re: [AD] al_get_path |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
On Sat April 4 2009, Elias Pschernig wrote: > Thomas Fjellstrom wrote: > > On Sat April 4 2009, Elias Pschernig wrote: > > > Is there a reason al_get_path doesn't return an ALLEGRO_PATH? > > > > Probably only because most functions you'll be using it with take a C > > string. > > Not sure, compare this: > > ALLEGRO_PATH *path = al_get_path(AL_USER_DATA_PATH); > al_path_set_filename(path, "myconfig.ini"); > config = al_load_config_file(al_path_get_string(path, '/')); > > vs (with current API): > > char temp[1024]; > al_get_path(AL_USER_DATA_PATH, temp, sizeof temp); > ALLEGRO_PATH *path = al_path_create(temp); > al_path_set_filename(path, "myconfig.ini"); > config = al_load_config_file(al_path_get_string(path, '/')); > > So to me it seems if we change it to return an ALLEGRO_PATH it would be > easier to use.. > Elias Pschernig <elias@xxxxxxxxxx> > > --------------------------------------------------------------------------- >--- Thomas Fjellstrom tfjellstrom@xxxxxxxxxx |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |