Fixed FPS stable computation

This commit is contained in:
brunoherbelin
2021-02-23 23:44:04 +01:00
parent 0ee5eebf91
commit afc0c7af0e
2 changed files with 5 additions and 7 deletions

View File

@@ -33,7 +33,7 @@ public:
// update session and all views
void update();
inline float dt() const { return dt_;}
inline float fps() const { return fps_;}
inline int fps() const { return int(roundf(1000.f/dt__));}
// draw session and current view
void draw();
@@ -129,7 +129,7 @@ protected:
TransitionView transition_;
float dt_;
float fps_;
float dt__;
};
#endif // MIXER_H