Re: [AD] crash! set_gfx_mode(GFX_TEXT...); vs draw_mouse()

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


> i put  remove_mouse() before the call to set_gfx_mode(GFX_TEXT)  and it 
> seems to work.
> 
> RECOMMENDATION:
> 
> the documentation  at remove_mouse()  says "You don't normally need to 
> bother calling this, because allegro_exit() will do it for you. "
> to me, this says.  remove_mouse()  doesn't need to be called.
> But a set_gfx_mode(GFX_TEXT)  before allegro_exit() will make my program 
> crash... well at least in win32 it does.
> As this probably only occurs in the win32 version of allegro,  changing the 
> docs seems wrong.
> 
> can remove_mouse()  be called  automatically by the  set_gfx_mode() but 
> only when the driver selected is GFX_TEXT.
> this will stop it from crashing, and the mouse will not be removed when 
> changing to other gfx_modes.
> i do not see any reason why someone would want to set GFX_TEXT mode && 
> leave the mouse driver still running.

Because they may want to set a graphic mode again after switching to text
mode. IMO, this would be an undesirable side-effect of calling set_gfx_mode.
If the problem is really the mouse being drawn, won't show_mouse(NULL) fix the
problem as well? In that case, I would suggest that something like that be
added to set_gfx_mode because it does make sense to me that the mouse will
not be drawn when the display mode is changed.

Evert




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