diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 15:51:40 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 15:51:40 +0100 |
| commit | df91c6624b69ee4e6c6eeca20ed68d331ed0e728 (patch) | |
| tree | 323c88b9df89bf8abaa2b98d10808474ab675dc2 /runtime/test/gameinput_probe.cpp | |
| parent | b40d8039a98f57b26bd05860febbabbe59b97873 (diff) | |
| parent | 6a6704df1592e1dc4a3215ddf1423a78adb52045 (diff) | |
Merge main into test/valu-int-misc (#1492)
Conflicted files: runtime/test/shaders/check.py, scripts/run_gpu_tests.py
AI-assisted.
Diffstat (limited to 'runtime/test/gameinput_probe.cpp')
| -rw-r--r-- | runtime/test/gameinput_probe.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/test/gameinput_probe.cpp b/runtime/test/gameinput_probe.cpp index aa077b257..32ddf5d91 100644 --- a/runtime/test/gameinput_probe.cpp +++ b/runtime/test/gameinput_probe.cpp | |||
| @@ -85,12 +85,17 @@ int main(int argc, char** argv) { | |||
| 85 | if (input->GetCurrentReading(GameInputKindGamepad, nullptr, &r) == S_OK) { | 85 | if (input->GetCurrentReading(GameInputKindGamepad, nullptr, &r) == S_OK) { |
| 86 | GameInputGamepadState s{}; | 86 | GameInputGamepadState s{}; |
| 87 | GameInputUiNavigationState ui{}; | 87 | GameInputUiNavigationState ui{}; |
| 88 | GameInputMotionState m{}; | ||
| 89 | const bool motion = r->GetMotionState(&m); | ||
| 88 | r->GetGamepadState(&s); | 90 | r->GetGamepadState(&s); |
| 89 | r->GetUiNavigationState(&ui); | 91 | r->GetUiNavigationState(&ui); |
| 90 | std::printf("\rbuttons=%04x ui=%06x LT=%.2f RT=%.2f L=(%+.2f,%+.2f) R=(%+.2f,%+.2f) seq=%llu ", s.buttons, | 92 | std::printf("\rbuttons=%04x ui=%06x LT=%.2f RT=%.2f L=(%+.2f,%+.2f) R=(%+.2f,%+.2f) seq=%llu ", s.buttons, |
| 91 | ui.buttons, s.leftTrigger, s.rightTrigger, s.leftThumbstickX, s.leftThumbstickY, | 93 | ui.buttons, s.leftTrigger, s.rightTrigger, s.leftThumbstickX, s.leftThumbstickY, |
| 92 | s.rightThumbstickX, s.rightThumbstickY, | 94 | s.rightThumbstickX, s.rightThumbstickY, |
| 93 | static_cast<unsigned long long>(r->GetSequenceNumber(GameInputKindGamepad))); | 95 | static_cast<unsigned long long>(r->GetSequenceNumber(GameInputKindGamepad))); |
| 96 | if (motion) // fractions of motionInfo's maxima: accel includes gravity, so a resting pad shows ~0.5 g | ||
| 97 | std::printf("\n[a]=(%+.2f,%+.2f,%+.2f) [w]=(%+.2f,%+.2f,%+.2f) ", m.accelerationX, m.accelerationY, | ||
| 98 | m.accelerationZ, m.angularVelocityX, m.angularVelocityY, m.angularVelocityZ); | ||
| 94 | std::fflush(stdout); | 99 | std::fflush(stdout); |
| 95 | r->Release(); | 100 | r->Release(); |
| 96 | } | 101 | } |