RE: [AD] d_ctext_proc |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Since I've been officially admitted in the small circle of contributors whose description ends with "too.", I must live up to my public image, so here are a bunch of patches. d_ctext_proc: (As an aside, it's a good thing you didn't apply my last patch, since it was incomplete) > The question is, why do you set a "normal" width for d_ctext_proc()? The > string will be partially outside of the box whatever width you choose. So I > assumed that the width used with d_ctext_proc() is almost always 0 or 1. For an unknown reason, I've gotten used to move the dialog half the intended width to the right and divide the intended width by two. (Pourquoi faire simple quand on peut faire complique' ?). I wouldn't dare setting a 0 size, though: I'm too scared of being struck by a SIGFPE ;) > I should have written > a blurb in api._tx though (patch attached). And a blurb about gui_ctext_proc, too (patch attached : new_api.diff). umodules: > > Modules (in linux/umodules) are loaded 2 times. > > Could you elaborate a bit? If I put a printf() right after dlopen() in > unix/umodules.c, I see only one line per module in module.lst with the main > test program. This happens only on the Linux console (not under X). If the system is autodetected and nothing is specified in the config file, _xwin_sysdrv_init (x/xsystem.c) is called before sys_linux_init (linux/lsystem.c). It first loads the modules and only then tries to open a display, which fails. Then sys_linux_init is called and loads the modules again. I suggest to return from _unix_load_modules when they're already loaded (patch attached : umodules.diff). Yet some other bugs: In linux/lsystem.c, __al_linux_shutdown_vga_helpers is called even when the corresponding init hasn't been done. Fixed in the attached patch (vga_helpers.diff) In the grabber, the 'New Object' dialog was animated with do_dialog, so in some cases (try running grabber and typing : Ins, Enter, Esc), the background wasn't re-drawn. (do_dialog replaced by popup_dialog in the patch grabber.diff). The function update_mouse (in src/linux/lmouse.c, not the one in src/mouse.c) is called both on SIGALRM (from __al_linux_update_standard_drivers, in src/linux/lstddrv.c) and on SIGIO (from async_io_event, in src/linux/lasyncio.c). (I'm still not using pthread :). update_mouse isn't reentrant, and on very heavy loads it fills up the memory with trash. I can't understand if it's possible to disable one of the two update methods, so I've attempted to lock the code that fill the buffer (see the patch update_mouse.diff). -- Annie
Attachment:
new_api.diff
Description: Binary data
Attachment:
umodules.diff
Description: Binary data
Attachment:
vga_helpers.diff
Description: Binary data
Attachment:
grabber.diff
Description: Binary data
Attachment:
update_mouse.diff
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |