equal
deleted
inserted
replaced
149 // ignore if not enabled |
149 // ignore if not enabled |
150 if (!_enabled) |
150 if (!_enabled) |
151 return; |
151 return; |
152 |
152 |
153 // all bits that are held down, even those ignored |
153 // all bits that are held down, even those ignored |
154 BitMaskType raw_value = 0; |
154 BitMaskType raw_value = 0, this_value = 0; |
155 |
155 |
156 // update the key-repeat queue |
156 // update the key-repeat queue |
157 queue.update(dt); |
157 queue.update(dt); |
158 |
158 |
159 // then go through the keymap |
159 // then go through the keymap |
185 // ignore repeats |
185 // ignore repeats |
186 continue; |
186 continue; |
187 } |
187 } |
188 } |
188 } |
189 |
189 |
190 // set bit in masks |
190 // set bit in value mask |
191 this->value |= e->input; |
191 this_value |= e->input; |
192 } |
192 } |
193 } |
193 } |
|
194 |
|
195 // signal unless value was and remains zero |
|
196 if (this_value || prev_value) { |
|
197 // trigger signal |
|
198 _sig_input(this_value, dt); |
|
199 } |
194 |
200 |
195 // update prev_value, also adding ignored values |
201 // update prev_value, also adding ignored values |
196 prev_value = raw_value; |
202 prev_value = raw_value; |
197 |
203 |
198 // then increment our dt |
204 // update our collective value + dt for use with readValue |
|
205 // XXX: remove this functionality? |
|
206 value |= this_value; |
199 this->dt += dt; |
207 this->dt += dt; |
200 } |
208 } |
201 |
209 |
202 template <typename BitEnumType, typename BitMaskType> |
210 template <typename BitEnumType, typename BitMaskType> |
203 void InputHandler<BitEnumType, BitMaskType>::readValue (BitMaskType &mask, TimeMS &dt) { |
211 void InputHandler<BitEnumType, BitMaskType>::readValue (BitMaskType &mask, TimeMS &dt) { |