* @brief Returns the supported platform capabilities to advertise to the client. * @return Capability flags. */
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected