Ignore:
Timestamp:
Jul 23, 2013, 9:39:21 PM (8 years ago)
Author:
lolbot
Message:

fixed 10 files out of 2754:

  • removed 386 CR characters
  • removed 4 trailing whitespaces
  • replaced 189 tabs with spaces
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/platform/d3d9/d3d9input.cpp

    r2810 r2812  
    6060            continue;
    6161#if defined LOL_INPUT_V2
    62                 // TODO: we can put more friendly name here, such as LeftAxisX, ButtonX...
    63                 InputDeviceInternal* stick = new InputDeviceInternal(String::Printf("Joystick%d", i+1).C());
    64                 for (int j = 0; j < 4; ++j)
    65                         stick->AddAxis(String::Printf("Axis%d", j+1).C());
    66                 for (int j = 0; j < 16; ++j)
    67                         stick->AddKey(String::Printf("Button%d", j+1).C());
     62        // TODO: we can put more friendly name here, such as LeftAxisX, ButtonX...
     63        InputDeviceInternal* stick = new InputDeviceInternal(String::Printf("Joystick%d", i+1).C());
     64        for (int j = 0; j < 4; ++j)
     65            stick->AddAxis(String::Printf("Axis%d", j+1).C());
     66        for (int j = 0; j < 16; ++j)
     67            stick->AddKey(String::Printf("Button%d", j+1).C());
    6868
    69                 m_data->m_joysticks.Push(i, stick);
     69        m_data->m_joysticks.Push(i, stick);
    7070#else
    7171        Stick *stick = Input::CreateStick();
     
    8787    {
    8888#if defined LOL_INPUT_V2
    89                 delete m_data->m_joysticks[0].m2;
     89        delete m_data->m_joysticks[0].m2;
    9090#else
    91                 Input::DestroyStick(m_data->m_joysticks[0].m2);
     91        Input::DestroyStick(m_data->m_joysticks[0].m2);
    9292#endif // LOL_INPUT_V2
    93                 m_data->m_joysticks.Remove(0);
     93        m_data->m_joysticks.Remove(0);
    9494    }
    9595#endif
     
    120120        for (int b = 0; b < 16; b++)
    121121#if defined LOL_INPUT_V2
    122                         m_data->m_joysticks[i].m2->SetKey(b, ((uint16_t)(state.Gamepad.wButtons) >> b) & 1);
     122            m_data->m_joysticks[i].m2->SetKey(b, ((uint16_t)(state.Gamepad.wButtons) >> b) & 1);
    123123#else
    124                         m_data->m_joysticks[i].m2->SetButton(b, ((uint16_t)(state.Gamepad.wButtons) >> b) & 1);
     124            m_data->m_joysticks[i].m2->SetButton(b, ((uint16_t)(state.Gamepad.wButtons) >> b) & 1);
    125125#endif // LOL_INPUT_V2
    126         }
     126    }
    127127#endif
    128128}
Note: See TracChangeset for help on using the changeset viewer.