ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Stark::Gfx::FrameLimiter Class Reference

A framerate limiter. More...

#include <framelimiter.h>

Collaboration diagram for Stark::Gfx::FrameLimiter:

List of all members.

Public Member Functions

 FrameLimiter (OSystem *system, const uint framerate)
void startFrame ()
void delayBeforeSwap ()
void pause (bool pause)
uint getLastFrameDuration () const

Private Attributes

bool _enabled
uint _speedLimitMs
uint _startFrameTime
uint _lastFrameDurationMs

Detailed Description

A framerate limiter.

Ensures the framerate does not exceed the specified value by delaying until all of the timeslot allocated to the frame is consumed. Allows to curb CPU usage and have a stable framerate.

Definition at line 40 of file framelimiter.h.

Constructor & Destructor Documentation

Stark::Gfx::FrameLimiter::FrameLimiter ( OSystem system,
const uint  framerate 

Definition at line 30 of file framelimiter.cpp.

Member Function Documentation

void Stark::Gfx::FrameLimiter::delayBeforeSwap (  ) 

Definition at line 53 of file framelimiter.cpp.

uint Stark::Gfx::FrameLimiter::getLastFrameDuration (  )  const

Definition at line 69 of file framelimiter.cpp.

void Stark::Gfx::FrameLimiter::pause ( bool  pause  ) 

Definition at line 62 of file framelimiter.cpp.

void Stark::Gfx::FrameLimiter::startFrame (  ) 

Definition at line 43 of file framelimiter.cpp.

Member Data Documentation

Definition at line 53 of file framelimiter.h.

Definition at line 54 of file framelimiter.h.

Definition at line 55 of file framelimiter.h.

Definition at line 51 of file framelimiter.h.

The documentation for this class was generated from the following files:

Generated on Sat Sep 19 2020 05:06:08 for ResidualVM by doxygen 1.7.1
curved edge   curved edge