MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / alloc

Function alloc

src/input.cpp:1694–1708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1692 }
1693
1694 std::shared_ptr<input_t> alloc(safe::mail_t mail) {
1695 auto input = std::make_shared<input_t>(
1696 mail->event<input::touch_port_t>(mail::touch_port),
1697 mail->queue<platf::gamepad_feedback_msg_t>(mail::gamepad_feedback)
1698 );
1699
1700 // Workaround to ensure new frames will be captured when a client connects
1701 task_pool.pushDelayed([]() {
1702 platf::move_mouse(platf_input, 1, 1);
1703 platf::move_mouse(platf_input, -1, -1);
1704 },
1705 100ms);
1706
1707 return input;
1708 }
1709} // namespace input

Callers 1

cmd_announceFunction · 0.70

Calls 2

move_mouseFunction · 0.50
pushDelayedMethod · 0.45

Tested by

no test coverage detected