Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 23, 2008, 12:15:09 AM (17 years ago)
Author:
rgrieder
Message:
  • Fixed issue with relative mouse movements.
  • Fixed bug when parsing commands in keybindings.ini
  • Fixed potential framerate dependency with relative movements
  • Simplified the use of a configured input command
  • Changed how parametrised input is handled (superposition and [-1,1]-clamp instead of average).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/core/input/KeyBinder.h

    r1888 r2001  
    7171        void tickJoyStick(float dt, unsigned int joyStick);
    7272        // internal
    73         void tickDevices(HalfAxis* begin, HalfAxis* end);
     73        void tickHalfAxis(HalfAxis& halfAxis);
    7474
    7575        void buttonThresholdChanged();
     
    149149        //! Filename of default keybindings.
    150150        std::string defaultKeybindings_;
     151        //! Whether to filter small value analog input
     152        bool bFilterAnalogNoise_;
    151153        //! Threshold for analog triggers until which the state is 0.
    152154        float analogThreshold_;
     
    162164        float mouseSensitivityDerived_;
    163165        //! Equals one step of the mousewheel
    164         float mouseWheelStepSize_;
     166        int mouseWheelStepSize_;
    165167
    166168        //##### Constant config variables #####
     
    198200    { joyStickButtons_[joyStickID][id].execute(KeybindMode::OnHold); }
    199201
    200     inline void KeyBinder::tickJoyStick(float dt, unsigned int joyStick)
    201     {
    202         tickDevices(&joyStickAxes_[joyStick][0], &joyStickAxes_[joyStick][JoyStickAxisCode::numberOfAxes * 2]);
    203     }
    204 
    205202    inline void KeyBinder::tickInput(float dt)
    206203    {
    207204        // execute all buffered bindings (additional parameter)
    208205        for (unsigned int i = 0; i < paramCommandBuffer_.size(); i++)
     206        {
     207            paramCommandBuffer_[i]->rel_ *= dt;
    209208            paramCommandBuffer_[i]->execute();
     209        }
    210210
    211211        // always reset the relative movement of the mouse
Note: See TracChangeset for help on using the changeset viewer.