One other thing to watch out for.  You need to close any modeless dialogs when the user leaves the game mode, or they'll stay around and probably crash later.  Look at the call to OfferClose (for the offer dialog) in intrface.c.  You should add a new method called WhoClose that closes the dialog if it's up.  Add a call to WhoClose in intrface.c.