[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Half-ugly fullscreen applications, how to recover when things go bump




31 jul 2009 kl. 13.48 skrev Vincent Rivière:

Peter Persson wrote:
The biggest problem with this is that when something goes wrong, i.e. if the app crashes, I need to restore the desktop screen and keyboard/mouse/joystick vectors.

The solution to make such cleanup may be GEMDOS vector VEC_CRITICALERR as described here:
http://cd.textfiles.com/ataricompendium/BOOK/HTML/CHAP2.HTM#gdvectors

I read about this too, but it feels "dirty" somehow. Isn't this a global vector, i.e. if some other app crashes, that would cause an unintentionall cleanup (resulting in all sorts of funny side effects)?

Another solution could be to hook the 68000 exceptions vectors directly (bus error, adress error...). The MiNT function Psignal() with SIGBUS, etc. may work, or even the signal() function in the MiNTLib.

Ok, there's no turning back now, I finally have to learn about signals. Thanks!

-- PeP