32 #ifndef _SDL2_framerate_h
33 #define _SDL2_framerate_h
46 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
55 #define FPS_UPPER_LIMIT 200
60 #define FPS_LOWER_LIMIT 1
65 #define FPS_DEFAULT 30
82 # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT)
83 # define SDL2_FRAMERATE_SCOPE __declspec(dllexport)
85 # ifdef LIBSDL2_GFX_DLL_IMPORT
86 # define SDL2_FRAMERATE_SCOPE __declspec(dllimport)
90 #ifndef SDL2_FRAMERATE_SCOPE
91 # define SDL2_FRAMERATE_SCOPE extern
void SDL_initFramerate(FPSmanager *manager)
Initialize the framerate manager.
int SDL_getFramerate(FPSmanager *manager)
Return the current target framerate in Hz.
int SDL_getFramecount(FPSmanager *manager)
Return the current framecount.
#define SDL2_FRAMERATE_SCOPE
int SDL_setFramerate(FPSmanager *manager, Uint32 rate)
Set the framerate in Hz.
Uint32 SDL_framerateDelay(FPSmanager *manager)
Delay execution to maintain a constant framerate and calculate fps.
Structure holding the state and timing information of the framerate controller.