Skip to content

Commit e8c0e94

Browse files
qweasdd136963Xottab-DUTY
authored andcommitted
Fixed text disappear on x64 (uninitialized variables)
Fixed visibility indicator OpenAL: fixed sound stopping when game freezes/pauses
1 parent 4b55def commit e8c0e94

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/xrGame/ui/UILines.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ CUILines::CUILines()
2121
m_eVTextAlign = valTop;
2222
m_dwTextColor = 0xffffffff;
2323
m_TextOffset.set(0.0f, 0.0f);
24+
m_wndSize.set(0.f, 0.f);
25+
m_wndPos.set(0.f, 0.f);
2426
m_text = "";
2527
uFlags.zero();
2628
uFlags.set(flNeedReparse, FALSE);

src/xrGame/ui/UIProgressShape.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CUIProgressShape::CUIProgressShape()
1313
m_blend = true;
1414
m_angle_begin = 0.0f;
1515
m_angle_end = PI_MUL_2;
16+
m_stage = 0.f;
1617
};
1718

1819
CUIProgressShape::~CUIProgressShape()

src/xrSound/SoundRender_TargetA.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ void CSoundRender_TargetA::update()
111111
A_CHK(alSourceQueueBuffers(pSource, 1, &BufferID));
112112
--processed;
113113
}
114+
115+
// kcat: If there's a long enough freeze and the sources underrun, they go to an AL_STOPPED state.
116+
// That update function will correctly see this and remove/refill/requeue the buffers, but doesn't restart the source
117+
// (that's in the separate else block that didn't run this time).Because the source remains AL_STOPPED,
118+
// the next update will still see all the buffers marked as processed and remove / refill / requeue them again.
119+
// It keeps doing this and never actually restarts the source after an underrun.
120+
ALint state;
121+
A_CHK(alGetSourcei(pSource, AL_SOURCE_STATE, &state));
122+
if (state == AL_STOPPED)
123+
A_CHK(alSourcePlay(pSource));
124+
//
114125
}
115126
else
116127
{

0 commit comments

Comments
 (0)