mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Wiimote: Fixed crash that would occur if no gamepad was detected
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2211 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -365,10 +365,13 @@ void SingleShake(u8 &_z, u8 &_y)
|
||||
// ------------------------------------------
|
||||
/* Tilting Wiimote with gamepad. We can guess that the game will calculate a Wiimote pitch and use it as a
|
||||
measure of the tilting of the Wiimote. We are interested in this tilting range
|
||||
90<EFBFBD> to -90<39> */
|
||||
90<39> to -90<39> */
|
||||
// ---------------
|
||||
void TiltWiimoteGamepad(u8 &_y, u8 &_z)
|
||||
{
|
||||
// Return if we have no pads
|
||||
if (NumGoodPads == 0) return;
|
||||
|
||||
// Update the pad state
|
||||
const int Page = 0;
|
||||
WiiMoteEmu::GetJoyState(PadState[Page], PadMapping[Page], Page, joyinfo[PadMapping[Page].ID].NumButtons);
|
||||
|
Reference in New Issue
Block a user