@@ -1017,42 +1017,45 @@ void OptionsMenu::Draw()
10171017
10181018 case OptionsMenuState::Idle:
10191019 {
1020- for ( auto & spInputManager : App::s_pApp-> m_pDoc -> m_vspInputManager )
1020+ if (s_commonMenu. IsOpen () )
10211021 {
1022- auto & rPadState = spInputManager->m_PadState ;
1022+ for (auto & spInputManager : App::s_pApp->m_pDoc ->m_vspInputManager )
1023+ {
1024+ auto & rPadState = spInputManager->m_PadState ;
10231025
1024- if (rPadState.IsDown (Sonicteam::SoX::Input::KeyState_DpadUp) || -rPadState.LeftStickVertical > 0 .5f )
1025- upIsHeld = true ;
1026+ if (rPadState.IsDown (Sonicteam::SoX::Input::KeyState_DpadUp) || -rPadState.LeftStickVertical > 0 .5f )
1027+ upIsHeld = true ;
10261028
1027- if (!g_upWasHeld && upIsHeld)
1028- g_up = true ;
1029+ if (!g_upWasHeld && upIsHeld)
1030+ g_up = true ;
10291031
1030- if (rPadState.IsDown (Sonicteam::SoX::Input::KeyState_DpadDown) || -rPadState.LeftStickVertical < -0 .5f )
1031- downIsHeld = true ;
1032+ if (rPadState.IsDown (Sonicteam::SoX::Input::KeyState_DpadDown) || -rPadState.LeftStickVertical < -0 .5f )
1033+ downIsHeld = true ;
10321034
1033- if (!g_downWasHeld && downIsHeld)
1034- g_down = true ;
1035+ if (!g_downWasHeld && downIsHeld)
1036+ g_down = true ;
10351037
1036- if (rPadState.IsDown (Sonicteam::SoX::Input::KeyState_DpadLeft) || -rPadState.LeftStickHorizontal > 0 .5f )
1037- leftIsHeld = true ;
1038+ if (rPadState.IsDown (Sonicteam::SoX::Input::KeyState_DpadLeft) || -rPadState.LeftStickHorizontal > 0 .5f )
1039+ leftIsHeld = true ;
10381040
1039- if (!g_leftWasHeld && leftIsHeld)
1040- g_left = true ;
1041+ if (!g_leftWasHeld && leftIsHeld)
1042+ g_left = true ;
10411043
1042- if (rPadState.IsDown (Sonicteam::SoX::Input::KeyState_DpadRight) || -rPadState.LeftStickHorizontal < -0 .5f )
1043- rightIsHeld = true ;
1044+ if (rPadState.IsDown (Sonicteam::SoX::Input::KeyState_DpadRight) || -rPadState.LeftStickHorizontal < -0 .5f )
1045+ rightIsHeld = true ;
10441046
1045- if (!g_rightWasHeld && rightIsHeld)
1046- g_right = true ;
1047+ if (!g_rightWasHeld && rightIsHeld)
1048+ g_right = true ;
10471049
1048- if (rPadState.IsPressed (Sonicteam::SoX::Input::KeyState_A))
1049- g_isAccepted = true ;
1050+ if (rPadState.IsPressed (Sonicteam::SoX::Input::KeyState_A))
1051+ g_isAccepted = true ;
10501052
1051- if (rPadState.IsPressed (Sonicteam::SoX::Input::KeyState_B))
1052- g_isDeclined = true ;
1053+ if (rPadState.IsPressed (Sonicteam::SoX::Input::KeyState_B))
1054+ g_isDeclined = true ;
10531055
1054- if (rPadState.IsPressed (Sonicteam::SoX::Input::KeyState_X))
1055- g_isReset = true ;
1056+ if (rPadState.IsPressed (Sonicteam::SoX::Input::KeyState_X))
1057+ g_isReset = true ;
1058+ }
10561059 }
10571060
10581061 if (s_isPause)
0 commit comments