Browse files

renamed framerateDelay to getFramerateDelay and created wrapper with …

…old name
  • Loading branch information...
1 parent df8404f commit 2640866cfa71a66eb8caea69c68cad78a331e3ae @natearn committed Mar 2, 2012
Showing with 8 additions and 2 deletions.
  1. +6 −1 SDL_framerate.c
  2. +2 −1 SDL_framerate.h
View
7 SDL_framerate.c
@@ -96,7 +96,7 @@ drawing too slow), the delay is zero and the delay interpolation is reset.
\param manager Pointer to the framerate manager.
*/
-Uint32 SDL_framerateDelay(FPSmanager * manager)
+Uint32 SDL_getFramerateDelay(FPSmanager * manager)
{
Uint32 current_ticks;
Uint32 target_ticks;
@@ -135,3 +135,8 @@ Uint32 SDL_framerateDelay(FPSmanager * manager)
}
return 0;
}
+
+void SDL_framerateDelay(FPSmanager * manager)
+{
+ SDL_Delay(SDL_getFramerateDelay(manager));
+}
View
3 SDL_framerate.h
@@ -67,7 +67,8 @@ extern "C" {
SDL_FRAMERATE_SCOPE int SDL_setFramerate(FPSmanager * manager, Uint32 rate);
SDL_FRAMERATE_SCOPE int SDL_getFramerate(FPSmanager * manager);
SDL_FRAMERATE_SCOPE int SDL_getFramecount(FPSmanager * manager);
- SDL_FRAMERATE_SCOPE Uint32 SDL_framerateDelay(FPSmanager * manager);
+ SDL_FRAMERATE_SCOPE Uint32 SDL_getFramerateDelay(FPSmanager * manager);
+ SDL_FRAMERATE_SCOPE void SDL_framerateDelay(FPSmanager * manager);
/* --- */

1 comment on commit 2640866

@natearn
Owner

For backwards compatibility. Perhaps a macro would have been better than a wrapper function.

Please sign in to comment.