mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Use gameHandleEvents for time updating
# Conflicts: # source/blood/src/gui.cpp
This commit is contained in:
parent
01d63d19e9
commit
df415605ae
4 changed files with 6 additions and 9 deletions
|
@ -1763,10 +1763,8 @@ RESTART:
|
|||
break;
|
||||
faketimerhandler();
|
||||
ProcessFrame();
|
||||
timerUpdateClock();
|
||||
gameUpdate = true;
|
||||
}
|
||||
timerUpdateClock();
|
||||
}
|
||||
if (gameUpdate)
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ char Wait(int nTicks)
|
|||
totalclock = 0;
|
||||
while (totalclock < nTicks)
|
||||
{
|
||||
timerUpdateClock();
|
||||
gameHandleEvents();
|
||||
char key = keyGetScan();
|
||||
if (key)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ char DoFade(char r, char g, char b, int nTicks)
|
|||
totalclock = gFrameClock = 0;
|
||||
do
|
||||
{
|
||||
while (totalclock < gFrameClock) { timerUpdateClock();};
|
||||
while (totalclock < gFrameClock) { gameHandleEvents();};
|
||||
gFrameClock += 2;
|
||||
scrNextPage();
|
||||
scrFadeAmount(divscale16(ClipHigh((int)totalclock, nTicks), nTicks));
|
||||
|
@ -86,7 +86,8 @@ char DoUnFade(int nTicks)
|
|||
totalclock = gFrameClock = 0;
|
||||
do
|
||||
{
|
||||
while (totalclock < gFrameClock) { timerUpdateClock(); };
|
||||
while (totalclock < gFrameClock) { gameHandleEvents(); };
|
||||
gFrameClock += 2;
|
||||
scrNextPage();
|
||||
scrFadeAmount(0x10000-divscale16(ClipHigh((int)totalclock, nTicks), nTicks));
|
||||
if (keyGetScan())
|
||||
|
@ -250,7 +251,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
|
|||
|
||||
UpdateDacs(0, true);
|
||||
|
||||
timerUpdateClock();
|
||||
gameHandleEvents();
|
||||
ClockTicks nStartTime = totalclock;
|
||||
|
||||
ctrlClearAllInput();
|
||||
|
|
|
@ -1375,7 +1375,6 @@ void netUpdate(void)
|
|||
|
||||
void faketimerhandler(void)
|
||||
{
|
||||
timerUpdateClock();
|
||||
#ifndef NETCODE_DISABLE
|
||||
if (gNetMode != NETWORK_NONE && gNetENetInit)
|
||||
netUpdate();
|
||||
|
|
|
@ -3023,8 +3023,7 @@ void viewDrawScreen(void)
|
|||
#ifdef USE_OPENGL
|
||||
polymostcenterhoriz = defaultHoriz;
|
||||
#endif
|
||||
|
||||
timerUpdateClock();
|
||||
gameHandleEvents();
|
||||
ClockTicks delta = totalclock - lastUpdate;
|
||||
if (delta < 0)
|
||||
delta = 0;
|
||||
|
|
Loading…
Reference in a new issue