summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/client.h b/src/client.h
index 5b88dd5a..be591979 100644
--- a/src/client.h
+++ b/src/client.h
@@ -30,7 +30,6 @@
#include <guichan/actionlistener.hpp>
#include <SDL.h>
-#include <SDL2_framerate.h>
#include <string>
@@ -117,6 +116,16 @@ enum State {
STATE_FORCE_QUIT
};
+class FpsManager
+{
+ int mFpsLimit = 0;
+ uint32_t mFrameCount = 0;
+ uint32_t mBaseTicks = 0;
+
+public:
+ void limitFps(int fpsLimit);
+};
+
/**
* The core part of the client. This class initializes all subsystems, runs
* the event loop, and shuts everything down again.
@@ -249,8 +258,8 @@ private:
SDL_TimerID mLogicCounterId = 0;
SDL_TimerID mSecondsCounterId = 0;
- bool mLimitFps = false;
- FPSmanager mFpsManager;
+ int mFpsLimit = 0;
+ FpsManager mFpsManager;
};
#endif // CLIENT_H