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 | |
| parent | 9ae90ce75478e49844cf984562db0dc1a074462f (diff) | |
Make gbm binary respect numframes
Diffstat (limited to 'kmscube')
| -rw-r--r-- | kmscube/cube-gbm.cpp | 7 | ||||
| -rw-r--r-- | kmscube/cube.cpp | 2 |
2 files changed, 7 insertions, 2 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; diff --git a/kmscube/cube.cpp b/kmscube/cube.cpp index 406bb8d..420c657 100644 --- a/kmscube/cube.cpp +++ b/kmscube/cube.cpp @@ -32,7 +32,7 @@ using namespace std; bool s_verbose; bool s_fullscreen; -unsigned s_num_frames; +unsigned s_num_frames = 0; int main(int argc, char* argv[]) { |
