diff --git a/source/game/game.cpp b/source/game/game.cpp index a507b439e..498de48b0 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -793,6 +793,7 @@ void CGameScene::initLevel() CActorPool::SetUpCache(); m_musicStarted=false; + SetPadRescan(); SYSTEM_DBGMSG("InitLevelDone\n"); } diff --git a/source/pad/pads.cpp b/source/pad/pads.cpp index 3e81ea4a2..39bdd8b0f 100644 --- a/source/pad/pads.cpp +++ b/source/pad/pads.cpp @@ -28,13 +28,14 @@ u8 PadBuffer[2][34]; u8 PadAlign[6]={0,1,0xFF,0xFF,0xFF,0xFF}; u8 PadMotor[2][2]; int PadRepeatTimers[2][16]; +int PadRescan=0; typedef struct { int m_vibrationTurnedOn; u8 m_intensityValue; } PadVibeData; -#ifdef __USER_CDBUILD__ +#if defined(__USER_CDBUILD__ ) static PadVibeData s_padVibeData[2]={{true,0},{true,0}}; #else static PadVibeData s_padVibeData[2]={{false,0},{false,0}}; @@ -207,6 +208,12 @@ int PadIsDualShock(int Port) return (PadData[Port].IsAnalogue==2); } +/*****************************************************************************/ +void SetPadRescan() +{ + PadRescan=1; +} + /*****************************************************************************/ void ReadController(int Port) { @@ -287,8 +294,9 @@ int intensity; { Pad->Send = 0; } - if ( Pad->Send==0 ) + if ( Pad->Send==0 || PadRescan) { + PadRescan=0; PadSetAct(PortShift,&(Pad->Motor0),2); if (Pad->Status == PadStateFindCTP1) diff --git a/source/pad/pads.h b/source/pad/pads.h index 83863903a..178b313f9 100644 --- a/source/pad/pads.h +++ b/source/pad/pads.h @@ -79,6 +79,7 @@ void PadsInit(); void PadClear(int Port); void PadUpdate(); +void SetPadRescan(); sPadData *PadGet(int Port); u16 PadGetUp(int Port);