Phrase reception timeout
This commit is contained in:
parent
afd890afea
commit
2a11fc815b
|
@ -445,20 +445,25 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
||||||
u32 NameLen = CStringLength(Mic.AnimationFileName);
|
u32 NameLen = CStringLength(Mic.AnimationFileName);
|
||||||
|
|
||||||
phrase_hue NewHue = PhraseHueMap_Get(BLState->PhraseHueMap, NameHash);
|
phrase_hue NewHue = PhraseHueMap_Get(BLState->PhraseHueMap, NameHash);
|
||||||
if (NewHue.Phrase.Length > 0 && BLState->NextHotHue.Phrase.Length < NewHue.Phrase.Length)
|
if (NewHue.Phrase.Length > 0)
|
||||||
{
|
{
|
||||||
PrintF(&DebugStr, "Queuing: %S\n", NewHue.Phrase);
|
bool IsLonger = (BLState->NextHotHue.Phrase.Length < NewHue.Phrase.Length);
|
||||||
NullTerminate(&DebugStr);
|
bool IsntInPhraseReceptionMode = !BLState->InPhraseReceptionMode;
|
||||||
OutputDebugString(DebugStr.Str);
|
if (IsLonger || IsntInPhraseReceptionMode)
|
||||||
|
|
||||||
BLState->NextHotHue = NewHue;
|
|
||||||
if (SecondsElapsed(BLState->TimePhraseReceptionBegan,
|
|
||||||
Context->SystemTime_Current) > PhrasePriorityMessageGroupingTime)
|
|
||||||
{
|
{
|
||||||
BLState->TimePhraseReceptionBegan = Context->SystemTime_Current;
|
PrintF(&DebugStr, "Queuing: %S\n", NewHue.Phrase);
|
||||||
BLState->InPhraseReceptionMode = true;
|
NullTerminate(&DebugStr);
|
||||||
|
OutputDebugString(DebugStr.Str);
|
||||||
|
|
||||||
|
BLState->NextHotHue = NewHue;
|
||||||
|
if (SecondsElapsed(BLState->TimePhraseReceptionBegan,
|
||||||
|
Context->SystemTime_Current) > PhrasePriorityMessageGroupingTime)
|
||||||
|
{
|
||||||
|
BLState->TimePhraseReceptionBegan = Context->SystemTime_Current;
|
||||||
|
BLState->InPhraseReceptionMode = true;
|
||||||
|
}
|
||||||
|
BLState->TimeLastPhraseReceived = Context->SystemTime_Current;
|
||||||
}
|
}
|
||||||
BLState->TimeLastPhraseReceived = Context->SystemTime_Current;
|
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue