Skip to content

Commit

Permalink
Make gbm binary respect numframes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidokert authored and tomba committed Nov 29, 2024
1 parent 9ae90ce commit 6cf6e88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion kmscube/cube-gbm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -250,6 +251,10 @@ class OutputHandler : private PageFlipHandlerBase
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;

Expand Down Expand Up @@ -289,7 +294,7 @@ class OutputHandler : private PageFlipHandlerBase
s_flip_pending++;
}

int m_frame_num;
unsigned m_frame_num;
chrono::steady_clock::time_point m_t1;

Connector* m_connector;
Expand Down
2 changes: 1 addition & 1 deletion kmscube/cube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
{
Expand Down

0 comments on commit 6cf6e88

Please sign in to comment.