mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
+21
-10
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user