kopia lustrzana https://gitlab.com/eliggett/wfview
Merge branch 'fixRace' into 'master'
Fix race condition populating stream deck button commands See merge request eliggett/wfview!20merge-requests/20/merge
commit
a1826a8104
|
@ -481,6 +481,14 @@ void controllerSetup::removeDevice(USBDEVICE* dev)
|
|||
|
||||
void controllerSetup::newDevice(USBDEVICE* dev)
|
||||
{
|
||||
while(buttons->begin()->onCommand == Q_NULLPTR) {
|
||||
QTime dieTime = QTime::currentTime().addMSecs( 10 );
|
||||
while( QTime::currentTime() < dieTime )
|
||||
{
|
||||
qWarning(logUsbControl()) <<"Wating for commands to be populated";
|
||||
QCoreApplication::processEvents( QEventLoop::AllEvents, 100 );
|
||||
}
|
||||
}
|
||||
QMutexLocker locker(mutex);
|
||||
|
||||
for (int i=0; i<ui->tabWidget->count();i++) {
|
||||
|
|
Ładowanie…
Reference in New Issue