File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ int UioDisplay::init() {
121121 // zero and notify the client we are starting
122122 memset (&(app.shmHeader ->frame ), 0 , sizeof (KVMFRFrame ));
123123 app.shmHeader ->flags &= ~KVMFR_HEADER_FLAG_RESTART;
124- app.running = true ;
124+ app.running = false ;
125125 mThread = std::unique_ptr<std::thread>(new std::thread (&UioDisplay::threadProc, this ));
126126 return 0 ;
127127}
@@ -163,8 +163,13 @@ int UioDisplay::postFb(buffer_handle_t fb) {
163163
164164void UioDisplay::threadProc () {
165165 while (true ) {
166- if (app.shmHeader ->flags & KVMFR_HEADER_FLAG_RESTART)
166+ if (app.shmHeader ->flags & KVMFR_HEADER_FLAG_RESTART) {
167+ app.running = false ;
167168 app.shmHeader ->flags &= ~KVMFR_HEADER_FLAG_RESTART;
168- usleep (16000 );
169+ sleep (5 );
170+ app.running = true ;
171+ } else {
172+ usleep (16000 );
173+ }
169174 }
170175}
You can’t perform that action at this time.
0 commit comments