upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/gameinput_test.cpp
diff options
context:
space:
mode:
authorTauwni <102470988+Tauwni@users.noreply.github.com>2026-11-26 12:19:12 +0100
committerTauwni <102470988+Tauwni@users.noreply.github.com>2026-11-26 12:19:12 +0100
commitbeffaa9a476ca1b3dfd9cfa55e39eafbb1f5eec6 (patch)
tree32877805bf4eb46d9a89d5753db6b5a2b06dc845 /runtime/test/gameinput_test.cpp
parentf29ca7bacae9507f83e8c56abdb604bd4efb4cf1 (diff)
parenta73a57e1339be072baf5522351c8ec7f1482b56b (diff)
Merge main into fix/null-descriptor-generated-dir
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
-rw-r--r--runtime/test/gameinput_test.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/test/gameinput_test.cpp b/runtime/test/gameinput_test.cpp
index b6658f51c..be9dc5398 100644
--- a/runtime/test/gameinput_test.cpp
+++ b/runtime/test/gameinput_test.cpp
@@ -1742,8 +1742,15 @@ int main(int argc, char** argv) {
1742 Sleep(350); 1742 Sleep(350);
1743 g_focus = true; 1743 g_focus = true;
1744 rt::gameinput::poll(); 1744 rt::gameinput::poll();
1745 // A scripted press lasts its 300 ms and then until the title has read the pads six times since it began
1746 // (update_keyboard_pad: kReads, at most kMaxHold seconds), so a title that polls slowly still sees it. Each
1747 // pad_state() is one GetCurrentReading, and this is the third since the X began.
1748 check(pad_state(input, nullptr).buttons == (GameInputGamepadX | GameInputGamepadB),
1749 "long script: past its 300 ms the press is still held while the title has read the pads fewer than six times");
1750 for (int i = 0; i < 6; ++i) pad_state(input, nullptr);
1751 rt::gameinput::poll();
1745 check(pad_state(input, nullptr).buttons == GameInputGamepadB, 1752 check(pad_state(input, nullptr).buttons == GameInputGamepadB,
1746 "long script: the timed press ends while the physical key stays held"); 1753 "long script: the timed press ends once the title has read it, while the physical key stays held");
1747 input->Release(); 1754 input->Release();
1748 std::printf("%d checks, %d failures\n", g_checks, g_failures); 1755 std::printf("%d checks, %d failures\n", g_checks, g_failures);
1749 return g_failures ? 1 : 0; 1756 return g_failures ? 1 : 0;