mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-04-04 06:29:41 +02:00
Slightly better timer interval management (with global const variable).
This commit is contained in:
3
MM.h
3
MM.h
@@ -57,6 +57,9 @@ public:
|
||||
static const qreal VERTEX_STICK_RADIUS = 10;
|
||||
static const qreal VERTEX_SELECT_RADIUS = 10;
|
||||
static const qreal VERTEX_SELECT_STROKE_WIDTH = 1;
|
||||
|
||||
// Time.
|
||||
static const float FRAMES_PER_SECOND = 29.97f;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -65,7 +65,7 @@ MainWindow::MainWindow()
|
||||
|
||||
// Create and start timer.
|
||||
videoTimer = new QTimer(this);
|
||||
videoTimer->setInterval(1000/30);
|
||||
videoTimer->setInterval( int( 1000 / MM::FRAMES_PER_SECOND ) );
|
||||
connect(videoTimer, SIGNAL(timeout()), this, SLOT(updateCanvases()));
|
||||
videoTimer->start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user