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

Function get_capabilities

src/platform/windows/input.cpp:1763–1781  ·  view source on GitHub ↗

* @brief Returns the supported platform capabilities to advertise to the client. * @return Capability flags. */

Source from the content-addressed store, hash-verified

1761 * @return Capability flags.
1762 */
1763 platform_caps::caps_t get_capabilities() {
1764 platform_caps::caps_t caps = 0;
1765
1766 // We support controller touchpad input as long as we're not emulating X360
1767 if (config::input.gamepad != "x360"sv) {
1768 caps |= platform_caps::controller_touch;
1769 }
1770
1771 // We support pen and touch input on Win10 1809+
1772 if (GetProcAddress(GetModuleHandleA("user32.dll"), "CreateSyntheticPointerDevice") != nullptr) {
1773 if (config::input.native_pen_touch) {
1774 caps |= platform_caps::pen_touch;
1775 }
1776 } else {
1777 BOOST_LOG(warning) << "Touch input requires Windows 10 1809 or later"sv;
1778 }
1779
1780 return caps;
1781 }
1782} // namespace platf

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected