Merge pull request #2730 from lioncash/undef

SI_DeviceGCController: Remedy undefined behavior regarding shifts
This commit is contained in:
flacs 2015-07-12 06:30:50 +02:00
commit b30ae1b9f8
1 changed files with 5 additions and 1 deletions

View File

@ -118,7 +118,11 @@ public:
virtual bool GetData(u32& _Hi, u32& _Low) override
{
CSIDevice_GCController::GetData(_Hi, _Low);
_Hi &= ~PAD_USE_ORIGIN << 16;
// Unset all bits except those that represent
// A, B, X, Y, Start and the error bits, as they
// are not used.
_Hi &= ~0x20FFFFFF;
return true;
}
};