diff options
| author | Kaido Kert <kaidokert@gmail.com> | 2024-11-29 02:04:12 +0000 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@iki.fi> | 2024-11-29 09:36:16 +0200 |
| commit | 6cf6e88715ac034f568603bce9a1b8f4a30c12ce (patch) | |
| tree | e270d87fa5a397f9175baf781a053566ff620eda /kmscube/cube-gbm.cpp | |
| parent | 9ae90ce75478e49844cf984562db0dc1a074462f (diff) | |
Make gbm binary respect numframes
Diffstat (limited to 'kmscube/cube-gbm.cpp')
| -rw-r--r-- | kmscube/cube-gbm.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kmscube/cube-gbm.cpp b/kmscube/cube-gbm.cpp index d998f0b..034ae8a 100644 --- a/kmscube/cube-gbm.cpp +++ b/kmscube/cube-gbm.cpp @@ -11,6 +11,7 @@ #include <kms++/kms++.h> #include <kms++util/kms++util.h> +#include "cube.h" #include "cube-egl.h" #include "cube-gles2.h" @@ -250,6 +251,10 @@ private: if (m_plane) m_surface2->free_prev(); + if (s_num_frames && m_frame_num >= s_num_frames) { + s_need_exit = true; + } + if (s_need_exit) return; @@ -289,7 +294,7 @@ private: s_flip_pending++; } - int m_frame_num; + unsigned m_frame_num; chrono::steady_clock::time_point m_t1; Connector* m_connector; |
