Fix input being ignored, fix CPauseScreen crash when starting a transition

This commit is contained in:
Phillip Stephens 2017-11-15 08:33:24 -08:00
parent baa6acd198
commit f1329268a6
3 changed files with 5 additions and 2 deletions

View File

@ -47,6 +47,7 @@
#include "Collision/CollisionUtil.hpp"
#include "World/CScriptWater.hpp"
#include "World/CScriptDoor.hpp"
#include "Input/ControlMapper.hpp"
#include <cmath>
@ -204,6 +205,7 @@ CStateManager::CStateManager(const std::weak_ptr<CRelayTracker>& relayTracker,
x90c_loaderFuncs[int(EScriptObjectType::ShadowProjector)] = ScriptLoader::LoadShadowProjector;
x90c_loaderFuncs[int(EScriptObjectType::EnergyBall)] = ScriptLoader::LoadEnergyBall;
ControlMapper::ResetCommandFilters();
x8f0_shadowTex = g_SimplePool->GetObj("DefaultShadow");
}

View File

@ -189,7 +189,7 @@ static FloatReturnFn skAnalogFuncs[] =
};
#define kCommandFilterCount 65
static bool skCommandFilterFlag[kCommandFilterCount];
static bool skCommandFilterFlag[kCommandFilterCount] = {true};
void ControlMapper::SetCommandFiltered(ECommands cmd, bool filtered)
{

View File

@ -116,7 +116,8 @@ void CPauseScreen::StartTransition(float time, const CStateManager& mgr, ESubScr
std::unique_ptr<CPauseScreenBase>& newScreenSlot = x7c_screens[x78_activeIdx];
std::unique_ptr<CGuiFrame>& newScreenInst = x64_frameInsts[x78_activeIdx];
newScreenSlot = BuildPauseSubScreen(xc_nextSubscreen, mgr, *newScreenInst);
x7c_screens[1 - x78_activeIdx]->TransitioningAway();
if (x7c_screens[1 - x78_activeIdx])
x7c_screens[1 - x78_activeIdx]->TransitioningAway();
x91_initialTransition = false;
}