Pressing pause key now stops dialog correctly (bug #167), from
chmmravatar git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@906 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
Changes towards version 0.3:
|
Changes towards version 0.3:
|
||||||
|
- Pressing pause key now stops dialog correctly (bug #167), from chmmravatar
|
||||||
- Fix some glitches in load/save screen (bug #163), from chmmravatar
|
- Fix some glitches in load/save screen (bug #163), from chmmravatar
|
||||||
- Utwig shield now pulsates properly (bug #269), from Nic
|
- Utwig shield now pulsates properly (bug #269), from Nic
|
||||||
- Fix for memory leak in TFB_DrawCanvas_ExtractPalette (bug #277),
|
- Fix for memory leak in TFB_DrawCanvas_ExtractPalette (bug #277),
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ typedef struct tfb_soundsource
|
|||||||
uint32 sbuf_size;
|
uint32 sbuf_size;
|
||||||
uint32 sbuf_offset;
|
uint32 sbuf_offset;
|
||||||
uint32 sbuf_lasttime;
|
uint32 sbuf_lasttime;
|
||||||
|
// keep track for paused tracks
|
||||||
|
uint32 pause_time;
|
||||||
} TFB_SoundSource;
|
} TFB_SoundSource;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ ResumeTrack ()
|
|||||||
playing = PlayingStream (SPEECH_SOURCE);
|
playing = PlayingStream (SPEECH_SOURCE);
|
||||||
if (!track_pos_changed && !playing && state == TFBSOUND_PAUSED)
|
if (!track_pos_changed && !playing && state == TFBSOUND_PAUSED)
|
||||||
{
|
{
|
||||||
|
/*adjust start time so the slider doesn't go crazy*/
|
||||||
|
soundSource[SPEECH_SOURCE].start_time += GetTimeCounter () - soundSource[SPEECH_SOURCE].pause_time;
|
||||||
ResumeStream (SPEECH_SOURCE);
|
ResumeStream (SPEECH_SOURCE);
|
||||||
UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
||||||
}
|
}
|
||||||
@@ -532,6 +534,7 @@ PauseTrack ()
|
|||||||
{
|
{
|
||||||
LockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
LockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
||||||
PauseStream (SPEECH_SOURCE);
|
PauseStream (SPEECH_SOURCE);
|
||||||
|
soundSource[SPEECH_SOURCE].pause_time = GetTimeCounter ();
|
||||||
UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ PauseGame (void)
|
|||||||
|
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE)
|
if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE)
|
||||||
SuspendGameClock ();
|
SuspendGameClock ();
|
||||||
else if (CommData.ConversationPhrases && PlayingTrack ())
|
if (CommData.ConversationPhrases && PlayingTrack ())
|
||||||
PauseTrack ();
|
PauseTrack ();
|
||||||
|
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
@@ -198,7 +198,7 @@ PauseGame (void)
|
|||||||
|
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE)
|
if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE)
|
||||||
ResumeGameClock ();
|
ResumeGameClock ();
|
||||||
else if (CommData.ConversationPhrases && PlayingTrack ())
|
if (CommData.ConversationPhrases && PlayingTrack ())
|
||||||
ResumeTrack ();
|
ResumeTrack ();
|
||||||
|
|
||||||
TaskSwitch ();
|
TaskSwitch ();
|
||||||
|
|||||||
Reference in New Issue
Block a user