| 277 | } |
| 278 | |
| 279 | static void SetDiscreteAxisValues(unsigned int keyID) |
| 280 | { |
| 281 | for (int i = 0; i < (int)BindingProfileID::Count; i++) |
| 282 | { |
| 283 | auto profileID = (BindingProfileID)i; |
| 284 | if (g_Bindings.GetBoundKeyID(profileID, In::Forward) == keyID) |
| 285 | { |
| 286 | AxisMap[AxisID::Move].y = 1.0f; |
| 287 | } |
| 288 | else if (g_Bindings.GetBoundKeyID(profileID, In::Back) == keyID) |
| 289 | { |
| 290 | AxisMap[AxisID::Move].y = -1.0f; |
| 291 | } |
| 292 | else if (g_Bindings.GetBoundKeyID(profileID, In::Left) == keyID) |
| 293 | { |
| 294 | AxisMap[AxisID::Move].x = -1.0f; |
| 295 | } |
| 296 | else if (g_Bindings.GetBoundKeyID(profileID, In::Right) == keyID) |
| 297 | { |
| 298 | AxisMap[AxisID::Move].x = 1.0f; |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | static void ReadKeyboard() |
| 304 | { |
no test coverage detected