ControllerInterface: Add RemoveDevice()

This adds RemoveDevice() to ControllerInterface, fixes ExpressionParser
and some other code to support device removals without crashing,
and adds an IsValid() method to Device, to prepare for hotplugging.
This commit is contained in:
Léo Lam
2016-07-14 17:45:59 +02:00
parent 0d783f0869
commit 93f5df4195
13 changed files with 69 additions and 19 deletions

View File

@ -86,6 +86,7 @@ std::string GCKeyboard::GetName() const
void GCKeyboard::GetInput(KeyboardStatus* const kb)
{
auto lock = ControllerEmu::GetStateLock();
m_keys0x->GetState(&kb->key0x, keys0_bitmasks);
m_keys1x->GetState(&kb->key1x, keys1_bitmasks);
m_keys2x->GetState(&kb->key2x, keys2_bitmasks);