Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9861


Ignore:
Timestamp:
Dec 2, 2013, 4:37:11 PM (11 years ago)
Author:
georgr
Message:

3s of lag are still here…next try

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/wiimote/src/libraries/core/input/WiiMote.cc

    r9860 r9861  
    1717                //else
    1818                  //orxout(user_warning) << "pointer is not null, yay" << std::endl;
    19                 if (PWii->Poll())
    20                 {
    21                         p->UpdateStatus();
    22                         //CWiimote::EventTypes e = p->GetEvent();
    23                         if(p->Buttons.isPressed(CButtons::BUTTON_A)||p->Buttons.isJustPressed(CButtons::BUTTON_A))
     19                PWii->Poll();
     20
     21                        p->UpdateStatus(); //perhaps this will help against the lag?
     22                        if(p->Buttons.isPressed(CButtons::BUTTON_A)||p->Buttons.isJustPressed(CButtons::BUTTON_A)) //ugly hack to just do something on button press easily
    2423                                {
    2524                                        CommandExecutor::execute("fire 0", 0, 0);
     
    2827
    2928                        p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw);
    30                         int x = (int)(500*(o.yaw-lastOrientation.yaw)/time.getDeltaTime());
     29                        int x = (int)(500*(o.yaw-lastOrientation.yaw)/time.getDeltaTime()); //get difference in orientation, divide by time to make faster movements result in faster orientation change
    3130                        int y = (int)((o.pitch-lastOrientation.pitch)/time.getDeltaTime());
    3231                        IntVector2 abs(0, 0);
     
    3938                        {
    4039                                for (unsigned int i = 0; i < inputStates_.size(); ++i)
    41                                                                 inputStates_[i]->mouseMoved(abs, rel, clippingSize);
     40                                                                inputStates_[i]->mouseMoved(abs, rel, clippingSize);    //pass random mouse movements to all input states
    4241                        }
    43                 }
     42                //}
    4443
    4544
Note: See TracChangeset for help on using the changeset viewer.