mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- Fixed: The FPS meter cannot use I_MSTime(), because if the game is started
with +vid_fps 1, it can need the time before the timer is ready to start. SVN r2009 (trunk)
This commit is contained in:
parent
a5c8b33f10
commit
26f14f439b
6 changed files with 28 additions and 2 deletions
|
@ -1,4 +1,6 @@
|
||||||
November 28, 2009
|
November 28, 2009
|
||||||
|
- Fixed: The FPS meter cannot use I_MSTime(), because if the game is started
|
||||||
|
with +vid_fps 1, it can need the time before the timer is ready to start.
|
||||||
- Initialize TempRenderTexture and the back buffer to black upon creation.
|
- Initialize TempRenderTexture and the back buffer to black upon creation.
|
||||||
- Fixed: Windowed mode always needs to draw to the temporary surface, even
|
- Fixed: Windowed mode always needs to draw to the temporary surface, even
|
||||||
when not gamma correcting, so that D3DFB::GetCurrentScreen() can read from
|
when not gamma correcting, so that D3DFB::GetCurrentScreen() can read from
|
||||||
|
|
|
@ -124,6 +124,12 @@ unsigned int I_MSTime (void)
|
||||||
return time - BaseTime;
|
return time - BaseTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Exactly the same thing, but based does no modification to the time.
|
||||||
|
unsigned int I_FPSTime()
|
||||||
|
{
|
||||||
|
return SDL_GetTicks();
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// I_GetTime
|
// I_GetTime
|
||||||
// returns time in 1/35th second tics
|
// returns time in 1/35th second tics
|
||||||
|
|
|
@ -126,6 +126,7 @@ bool I_WriteIniFailed ();
|
||||||
|
|
||||||
// [RH] Returns millisecond-accurate time
|
// [RH] Returns millisecond-accurate time
|
||||||
unsigned int I_MSTime (void);
|
unsigned int I_MSTime (void);
|
||||||
|
unsigned int I_FPSTime();
|
||||||
|
|
||||||
|
|
||||||
// Directory searching routines
|
// Directory searching routines
|
||||||
|
|
|
@ -838,7 +838,7 @@ void DFrameBuffer::DrawRateStuff ()
|
||||||
// Draws frame time and cumulative fps
|
// Draws frame time and cumulative fps
|
||||||
if (vid_fps)
|
if (vid_fps)
|
||||||
{
|
{
|
||||||
DWORD ms = I_MSTime ();
|
DWORD ms = I_FPSTime();
|
||||||
DWORD howlong = ms - LastMS;
|
DWORD howlong = ms - LastMS;
|
||||||
if (howlong >= 0)
|
if (howlong >= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -280,6 +280,22 @@ unsigned int I_MSTime()
|
||||||
return timeGetTime() - basetime;
|
return timeGetTime() - basetime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// I_FPSTime
|
||||||
|
//
|
||||||
|
// Returns the current system time in milliseconds. This is used by the FPS
|
||||||
|
// meter of DFrameBuffer::DrawRateStuff(). Since the screen can display
|
||||||
|
// before the play simulation is ready to begin, this needs to be
|
||||||
|
// separate from I_MSTime().
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
unsigned int I_FPSTime()
|
||||||
|
{
|
||||||
|
return timeGetTime();
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// I_GetTimePolled
|
// I_GetTimePolled
|
||||||
|
|
|
@ -132,6 +132,7 @@ bool I_WriteIniFailed ();
|
||||||
|
|
||||||
// [RH] Returns millisecond-accurate time
|
// [RH] Returns millisecond-accurate time
|
||||||
unsigned int I_MSTime (void);
|
unsigned int I_MSTime (void);
|
||||||
|
unsigned int I_FPSTime();
|
||||||
|
|
||||||
// [RH] Title banner to display during startup
|
// [RH] Title banner to display during startup
|
||||||
extern const IWADInfo *DoomStartupInfo;
|
extern const IWADInfo *DoomStartupInfo;
|
||||||
|
|
Loading…
Reference in a new issue