Merge pull request #2183 from RadWolfie/fix-imgui

HOTFIX: remove optimization due to AND bit operator does not keep in order
This commit is contained in:
ergo720 2021-04-05 21:51:07 +02:00 committed by GitHub
commit fe84236330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ bool InputDeviceManager::UpdateXboxPortInput(int usb_port, void* Buffer, int Dir
// First check if ImGui is focus, then ignore any input update occur.
// If somebody else is currently holding the lock, we won't wait and instead report no input changes
if (static_cast<uint8_t>(!g_renderbase->IsImGuiFocus()) & static_cast<uint8_t>(m_Mtx.try_lock())) {
if (!g_renderbase->IsImGuiFocus() && m_Mtx.try_lock()) {
for (auto &dev_ptr : m_Devices) {
if (dev_ptr->GetPort(usb_port)) {
switch (xid_type)