mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Some parts of the engine have to be rebuild in order to implement this correctly, therefore, it has been removed for now to avoid potential performance problems. fps_max_rt and fps_max_gfx have been limited to 295 to avoid a contest with the engine's hard limit causing huge performance hits.
31 lines
620 B
C++
31 lines
620 B
C++
#ifndef FRAMELIMIT_H
|
|
#define FRAMELIMIT_H
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// RenderThread frame limiter
|
|
//-----------------------------------------------------------------------------
|
|
class CFrameLimit
|
|
{
|
|
public:
|
|
CFrameLimit(void);
|
|
|
|
void Reset(double target);
|
|
void Run(void);
|
|
|
|
private:
|
|
double m_MilliSeconds;
|
|
double m_FramesPerSecond;
|
|
//double m_EffectiveMilliSeconds;
|
|
|
|
//LARGE_INTEGER m_Last;
|
|
LARGE_INTEGER m_Start;
|
|
LARGE_INTEGER m_Next;
|
|
LARGE_INTEGER m_Time;
|
|
uint32_t m_Frames;
|
|
bool m_bRestart;
|
|
};
|
|
|
|
extern CFrameLimit g_FrameLimiter;
|
|
|
|
#endif // FRAMELIMIT_H
|