Re: [AD] Bug when attempting to set GFX_AUTODETECT_WINDOWED in the DOS version of Allegro.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Michal Molhanec wrote:
Andrei Ellman napsal(a):

When I run the following line from a program compiled with the DOS version of Allegro 4.2 (compiled with DJGPP):

set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); the program has been known to crash with a SIGILL error (illegal instruction). My guess is that because on DOS there are no windowed modes, the pointer in some vtable or other is set to a dodgy address.

If there are no windowed modes available on the platform, then the set_gfx_mode function should just return gracefully with it's usual failiure-code.


It behaves exactly like that, either you are doing something wrong or the bug is elsewhere (tested with latest SVN 4.2)



Oops. It turned out that there was something wrong in my code - I forgot to check the return value of set_gfx_mode() and the app continued on regardless. My bad. :-[


AE.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/