Add exitThread() polling the exit button (#888)

* Add exitThread() polling the exit button

* Add missing includes

* Remove redundant code
This commit is contained in:
Michał Moskal
2019-08-28 22:43:22 -07:00
committed by Peli de Halleux
parent e511630c2e
commit 8b3461bebd
2 changed files with 28 additions and 7 deletions

View File

@ -159,11 +159,6 @@ namespace brick {
if (sl[i])
ret |= 1 << i
}
// this needs to be done in query(), which is run without the main JS execution mutex
// otherwise, while(true){} will lock the device
if (ret & DAL.BUTTON_ID_ESCAPE) {
control.reset()
}
return ret
}