How do I get rid of the delay when my program ends

BlitzMax Forums/BlitzMax Programming/How do I get rid of the delay when my program ends

What I had to do with the retroremakes framework to sort out the projection matrix issue you describe

Method CheckIfActive()
	If AppSuspended()
		TGameEngine.GetInstance().LogInfo("Game Suspended")
		rrPauseSound(True)
		Local susTimer:TTimer = CreateTimer(60)  'temporary timer to help free up CPU when game suspended
		'wait until app is active again
		While AppSuspended() 
			WaitTimer(susTimer)   'Do nothing and free up CPU
		Wend
		TGameEngine.GetInstance().LogInfo("Game Resumed")
		If Not windowed
			'When resuming from minimised full-screen display we need to recreate Grahics
			'and set up the projection matrix again due to DirectX oddness
			TGameEngine.GetInstance().LogInfo("Resetting Graphics Mode")
			Reset()
		EndIf
		'Reset the fixed timestep timer so we don't have any glitches
		rrResetFixedTimestep()
		rrResetFPS()
		rrPauseSound(False)
	EndIf		
End Method


The Reset() method does EndGraphics(), creates the Graphics mode again and then sets up the projection matrix again.

If you want to check all the code you can grab it from the Google Code link in my signature.