Skip to content

Commit

Permalink
Fixed text disappear on x64 (uninitialized variables)
Browse files Browse the repository at this point in the history
Fixed visibility indicator
OpenAL: fixed sound stopping when game freezes/pauses
  • Loading branch information
qweasdd136963 authored and Xottab-DUTY committed Jun 3, 2018
1 parent 4b55def commit e8c0e94
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xrGame/ui/UILines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ CUILines::CUILines()
m_eVTextAlign = valTop;
m_dwTextColor = 0xffffffff;
m_TextOffset.set(0.0f, 0.0f);
m_wndSize.set(0.f, 0.f);
m_wndPos.set(0.f, 0.f);
m_text = "";
uFlags.zero();
uFlags.set(flNeedReparse, FALSE);
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/ui/UIProgressShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CUIProgressShape::CUIProgressShape()
m_blend = true;
m_angle_begin = 0.0f;
m_angle_end = PI_MUL_2;
m_stage = 0.f;
};

CUIProgressShape::~CUIProgressShape()
Expand Down
11 changes: 11 additions & 0 deletions src/xrSound/SoundRender_TargetA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ void CSoundRender_TargetA::update()
A_CHK(alSourceQueueBuffers(pSource, 1, &BufferID));
--processed;
}

// kcat: If there's a long enough freeze and the sources underrun, they go to an AL_STOPPED state.
// That update function will correctly see this and remove/refill/requeue the buffers, but doesn't restart the source
// (that's in the separate else block that didn't run this time).Because the source remains AL_STOPPED,
// the next update will still see all the buffers marked as processed and remove / refill / requeue them again.
// It keeps doing this and never actually restarts the source after an underrun.
ALint state;
A_CHK(alGetSourcei(pSource, AL_SOURCE_STATE, &state));
if (state == AL_STOPPED)
A_CHK(alSourcePlay(pSource));
//

This comment has been minimized.

Copy link
@ForserX

ForserX Jun 3, 2018

Contributor

Зря... Зря-зря... Возьми новую версию фикса из окси.

This comment has been minimized.

Copy link
@Xottab-DUTY

Xottab-DUTY Jun 3, 2018

Member

@ForserX благодарю!

}
else
{
Expand Down

0 comments on commit e8c0e94

Please sign in to comment.