Someone smarter than me can probably figure out a more "proper" way to do this, but I hate RetroArch and wanted an easy way to Swap P1 and P2 without both players having to press the button at the same time.
The destructor of Resampler needs to be virtual, as it is subclassed
and pointers to objects subclassed from it are being deleted.
The issue in controls.cpp is that the loop ends up reading past the
end of an array. The small rewrite of the loop also makes it more
readable.
In memmap.cpp, there is an assignment statement of the following form:
a[i++] = b[i];
It is undefined what i's value should be in b[i], so this was made
explicit.