Fixed Direct3D9 bugs causing Project Mario to crash.