mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 09:44:02 +00:00
Fix resuming paused cutscene
This commit is contained in:
parent
e8f1129c24
commit
335b26d1e0
3 changed files with 13 additions and 12 deletions
|
@ -3815,7 +3815,7 @@ void DSQ::onUpdate(float dt)
|
|||
float sec = 1.0f/60.0f;
|
||||
while (isCutscenePaused())
|
||||
{
|
||||
pollEvents();
|
||||
pollEvents(sec);
|
||||
ActionMapper::onUpdate(sec);
|
||||
SDL_Delay(int(sec*1000));
|
||||
render();
|
||||
|
@ -3835,6 +3835,7 @@ void DSQ::onUpdate(float dt)
|
|||
}
|
||||
dsq->resetTimer();
|
||||
dsq->sound->resume();
|
||||
pollEvents(sec); // poll events again to reset internal state; else the ActionMapper::onUpdate() below triggers another ACTION_ESCAPE to re-pause the cutscene
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -687,17 +687,10 @@ void Core::onUpdate(float dt)
|
|||
core->mouse.lastPosition = core->mouse.position;
|
||||
core->mouse.lastScrollWheel = core->mouse.scrollWheel;
|
||||
|
||||
pollEvents();
|
||||
|
||||
for(size_t i = 0; i < joysticks.size(); ++i)
|
||||
if(joysticks[i])
|
||||
joysticks[i]->update(dt);
|
||||
pollEvents(dt);
|
||||
|
||||
onMouseInput();
|
||||
|
||||
// all input done; update button states
|
||||
updateActionButtons();
|
||||
|
||||
globalScale.update(dt);
|
||||
core->globalScaleChanged();
|
||||
|
||||
|
@ -1399,7 +1392,7 @@ void Core::run(float runTime)
|
|||
|
||||
while (!isWindowFocus())
|
||||
{
|
||||
pollEvents();
|
||||
pollEvents(dt);
|
||||
|
||||
onBackgroundUpdate();
|
||||
|
||||
|
@ -1585,7 +1578,7 @@ bool Core::doMouseConstraint()
|
|||
return false;
|
||||
}
|
||||
|
||||
void Core::pollEvents()
|
||||
void Core::pollEvents(float dt)
|
||||
{
|
||||
bool warpMouse=false;
|
||||
|
||||
|
@ -1791,6 +1784,13 @@ void Core::pollEvents()
|
|||
}
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < joysticks.size(); ++i)
|
||||
if(joysticks[i])
|
||||
joysticks[i]->update(dt);
|
||||
|
||||
// all input done; update button states
|
||||
updateActionButtons();
|
||||
|
||||
}
|
||||
|
||||
#define _VLN(x, y, x2, y2) glVertex2f(x, y); glVertex2f(x2, y2);
|
||||
|
|
|
@ -455,7 +455,7 @@ public:
|
|||
|
||||
std::vector<ScreenMode> screenModes;
|
||||
|
||||
void pollEvents();
|
||||
void pollEvents(float dt);
|
||||
|
||||
CoreSettings settings;
|
||||
|
||||
|
|
Loading…
Reference in a new issue