Skip to content

Commit

Permalink
Input: use interception_count to handle multiple concurrent modals
Browse files Browse the repository at this point in the history
  • Loading branch information
Megamouse committed Jun 1, 2019
1 parent f501dc6 commit f007128
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rpcs3/pad_thread.cpp
Expand Up @@ -159,11 +159,17 @@ void pad_thread::SetIntercepted(bool intercepted)
{
if (intercepted)
{
++interception_count;
m_info.system_info |= CELL_PAD_INFO_INTERCEPTED;
}
else
{
m_info.system_info &= ~CELL_PAD_INFO_INTERCEPTED;
interception_count.try_dec(0);

if (interception_count == 0)
{
m_info.system_info &= ~CELL_PAD_INFO_INTERCEPTED;
}
}
}

Expand Down
1 change: 1 addition & 0 deletions rpcs3/pad_thread.h
Expand Up @@ -43,6 +43,7 @@ class pad_thread
atomic_t<bool> active{ false };
atomic_t<bool> reset{ false };
atomic_t<bool> is_enabled{ true };
atomic_t<u32> interception_count{ 0 };
std::shared_ptr<std::thread> thread;
};

Expand Down

0 comments on commit f007128

Please sign in to comment.