mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-10 20:19:06 +00:00
Buffer overrun bug fixes
This commit is contained in:
parent
f60097b7e3
commit
31ccb48246
@ -204,6 +204,12 @@ struct SDSPStream : boo::IAudioVoiceCallback
|
|||||||
|
|
||||||
size_t supplyAudio(boo::IAudioVoice&, size_t frames, int16_t* data)
|
size_t supplyAudio(boo::IAudioVoice&, size_t frames, int16_t* data)
|
||||||
{
|
{
|
||||||
|
if (!x0_active)
|
||||||
|
{
|
||||||
|
memset(data, 0, frames * 2);
|
||||||
|
return frames;
|
||||||
|
}
|
||||||
|
|
||||||
if (xe8_silent)
|
if (xe8_silent)
|
||||||
{
|
{
|
||||||
StopStream();
|
StopStream();
|
||||||
|
@ -594,7 +594,7 @@ zeus::CFrustum CStateManager::SetupViewForDraw(const SViewport& vp) const
|
|||||||
zeus::CFrustum frustum;
|
zeus::CFrustum frustum;
|
||||||
zeus::CProjection proj;
|
zeus::CProjection proj;
|
||||||
proj.setPersp(zeus::SProjPersp{fov, width / height, cam->GetNearClipDistance(), cam->GetFarClipDistance()});
|
proj.setPersp(zeus::SProjPersp{fov, width / height, cam->GetNearClipDistance(), cam->GetFarClipDistance()});
|
||||||
frustum.updatePlanes(CGraphics::g_GXModelView, proj);
|
frustum.updatePlanes(camXf, proj);
|
||||||
g_Renderer->SetClippingPlanes(frustum);
|
g_Renderer->SetClippingPlanes(frustum);
|
||||||
//g_Renderer->PrimColor(zeus::CColor::skWhite);
|
//g_Renderer->PrimColor(zeus::CColor::skWhite);
|
||||||
CGraphics::SetModelMatrix(zeus::CTransform::Identity());
|
CGraphics::SetModelMatrix(zeus::CTransform::Identity());
|
||||||
|
@ -316,7 +316,7 @@ public:
|
|||||||
if (base::x0_size == N)
|
if (base::x0_size == N)
|
||||||
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
|
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
|
||||||
#endif
|
#endif
|
||||||
auto target_it = base::_const_cast_iterator(pos) - 1;
|
auto target_it = base::_const_cast_iterator(pos);
|
||||||
if (pos == base::cend())
|
if (pos == base::cend())
|
||||||
{
|
{
|
||||||
::new (static_cast<void*>(std::addressof(base::_value(base::x0_size)))) T(value);
|
::new (static_cast<void*>(std::addressof(base::_value(base::x0_size)))) T(value);
|
||||||
@ -339,7 +339,7 @@ public:
|
|||||||
if (base::x0_size == N)
|
if (base::x0_size == N)
|
||||||
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
|
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
|
||||||
#endif
|
#endif
|
||||||
auto target_it = base::_const_cast_iterator(pos) - 1;
|
auto target_it = base::_const_cast_iterator(pos);
|
||||||
if (pos == base::cend())
|
if (pos == base::cend())
|
||||||
{
|
{
|
||||||
::new (static_cast<void*>(std::addressof(base::_value(base::x0_size)))) T(std::forward<T>(value));
|
::new (static_cast<void*>(std::addressof(base::_value(base::x0_size)))) T(std::forward<T>(value));
|
||||||
@ -527,7 +527,7 @@ public:
|
|||||||
if (base::x0_size == N)
|
if (base::x0_size == N)
|
||||||
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
|
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
|
||||||
#endif
|
#endif
|
||||||
auto target_it = base::_const_cast_iterator(pos) - 1;
|
auto target_it = base::_const_cast_iterator(pos);
|
||||||
if (pos == base::cend())
|
if (pos == base::cend())
|
||||||
{
|
{
|
||||||
*target_it = value;
|
*target_it = value;
|
||||||
@ -548,7 +548,7 @@ public:
|
|||||||
if (base::x0_size == N)
|
if (base::x0_size == N)
|
||||||
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
|
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
|
||||||
#endif
|
#endif
|
||||||
auto target_it = base::_const_cast_iterator(pos) - 1;
|
auto target_it = base::_const_cast_iterator(pos);
|
||||||
if (pos == base::cend())
|
if (pos == base::cend())
|
||||||
{
|
{
|
||||||
*target_it = std::forward<T>(value);
|
*target_it = std::forward<T>(value);
|
||||||
|
2
amuse
2
amuse
@ -1 +1 @@
|
|||||||
Subproject commit ebe6f18898411aa8fa6aa6f5556333e463bbfff9
|
Subproject commit 3c7cf5515f9aeaf658f6fb6a8474743d027cc13f
|
2
specter
2
specter
@ -1 +1 @@
|
|||||||
Subproject commit 726c42873311435b263e6bc41444b393f13abee2
|
Subproject commit 410ab94d7f5d5d6c5081af90ae9c217b10978db1
|
Loading…
x
Reference in New Issue
Block a user