mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- fixed screenjob fadeout.
This commit is contained in:
parent
b7f0e2c3c3
commit
1646e302d2
1 changed files with 8 additions and 2 deletions
|
@ -791,7 +791,11 @@ public:
|
||||||
{
|
{
|
||||||
auto now = I_GetTimeNS();
|
auto now = I_GetTimeNS();
|
||||||
|
|
||||||
if (!M_Active())
|
if (startTime == -1)
|
||||||
|
{
|
||||||
|
lastTime = startTime = now;
|
||||||
|
}
|
||||||
|
else if (!M_Active())
|
||||||
{
|
{
|
||||||
clock += now - lastTime;
|
clock += now - lastTime;
|
||||||
if (clock == 0) clock = 1;
|
if (clock == 0) clock = 1;
|
||||||
|
@ -833,7 +837,8 @@ public:
|
||||||
if (jobs[index].job->fadestyle & DScreenJob::fadeout)
|
if (jobs[index].job->fadestyle & DScreenJob::fadeout)
|
||||||
{
|
{
|
||||||
twod->Lock();
|
twod->Lock();
|
||||||
startTime = I_nsTime();
|
startTime = -1;
|
||||||
|
clock = 0;
|
||||||
jobs[index].job->fadestate = DScreenJob::fadeout;
|
jobs[index].job->fadestate = DScreenJob::fadeout;
|
||||||
actionState = State_Fadeout;
|
actionState = State_Fadeout;
|
||||||
}
|
}
|
||||||
|
@ -846,6 +851,7 @@ public:
|
||||||
else if (actionState == State_Fadeout)
|
else if (actionState == State_Fadeout)
|
||||||
{
|
{
|
||||||
int ended = FadeoutFrame();
|
int ended = FadeoutFrame();
|
||||||
|
Printf("fadeout = %d\n", ended);
|
||||||
if (ended < 1)
|
if (ended < 1)
|
||||||
{
|
{
|
||||||
AdvanceJob(terminateState < 0);
|
AdvanceJob(terminateState < 0);
|
||||||
|
|
Loading…
Reference in a new issue