Fix memory leaks in strategic pathing

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1536 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-10-20 08:40:25 +00:00
parent b170dbb1e5
commit 13288fd750
10 changed files with 68 additions and 28 deletions
+21 -10
View File
@@ -629,11 +629,17 @@ INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UIN
}
InterruptTime();
PauseGame();
LockPauseState( 1 );
// Pause timers as well....
PauseTime( TRUE );
#if 0
gMsgBox.fWasPaused = GamePaused();
if (!gMsgBox.fWasPaused)
{
InterruptTime();
PauseGame();
LockPauseState( 1 );
// Pause timers as well....
PauseTime( TRUE );
}
#endif
// Save mouse restriction region...
GetRestrictedClipCursor( &gOldCursorLimitRectangle );
@@ -867,11 +873,16 @@ UINT32 ExitMsgBox( INT8 ubExitCode )
// Delete button images
UnloadButtonImage( gMsgBox.iButtonImages );
// Unpause game....
UnLockPauseState();
UnPauseGame();
// UnPause timers as well....
PauseTime( FALSE );
#if 0
if (!gMsgBox.fWasPaused)
{
// Unpause game....
UnLockPauseState();
UnPauseGame();
// UnPause timers as well....
PauseTime( FALSE );
}
#endif
// Restore mouse restriction region...
RestrictMouseCursor( &gOldCursorLimitRectangle );