Guard against controller instances without any inputs.

Clean up OS X keyboard key names.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6985 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2011-01-30 08:12:34 +00:00
parent aa410c8eea
commit f41e5b3b85
6 changed files with 121 additions and 189 deletions

View File

@ -505,6 +505,9 @@ ControllerInterface::Device::Control* ControllerInterface::InputReference::Detec
unsigned int time = 0;
bool* const states = new bool[device->Inputs().size()];
if (device->Inputs().size() == 0)
return NULL;
// get starting state of all inputs,
// so we can ignore those that were activated at time of Detect start
std::vector<Device::Input*>::const_iterator