| 300 | } |
| 301 | |
| 302 | void EmuThread::enqueueKeys(quint16 key1, quint16 key2, bool repeat) { |
| 303 | QMutexLocker locker(&m_keyQueueMutex); |
| 304 | if (!repeat || m_keyQueue.isEmpty() || |
| 305 | (m_keyQueue.front() != key1 && m_keyQueue.front() != key2)) { |
| 306 | for (auto key : {key1, key2}) { |
| 307 | if (key) { |
| 308 | m_keyQueue.enqueue(key); |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | void EmuThread::test(const QString &config, bool run) { |
| 315 | m_autotesterPath = config; |