Add option to disable native pen/touch support
This commit is contained in:
@@ -428,6 +428,7 @@ namespace config {
|
||||
true, // controller enabled
|
||||
true, // always send scancodes
|
||||
true, // high resolution scrolling
|
||||
true, // native pen/touch support
|
||||
};
|
||||
|
||||
sunshine_t sunshine {
|
||||
@@ -1061,6 +1062,8 @@ namespace config {
|
||||
bool_f(vars, "always_send_scancodes", input.always_send_scancodes);
|
||||
|
||||
bool_f(vars, "high_resolution_scrolling", input.high_resolution_scrolling);
|
||||
bool_f(vars, "native_pen_touch", input.native_pen_touch);
|
||||
|
||||
int port = sunshine.port;
|
||||
int_between_f(vars, "port"s, port, { 1024 + nvhttp::PORT_HTTPS, 65535 - rtsp_stream::RTSP_SETUP_PORT });
|
||||
sunshine.port = (std::uint16_t) port;
|
||||
|
||||
@@ -123,6 +123,7 @@ namespace config {
|
||||
bool always_send_scancodes;
|
||||
|
||||
bool high_resolution_scrolling;
|
||||
bool native_pen_touch;
|
||||
};
|
||||
|
||||
namespace flag {
|
||||
|
||||
@@ -1720,7 +1720,9 @@ namespace platf {
|
||||
|
||||
// We support pen and touch input on Win10 1809+
|
||||
if (GetProcAddress(GetModuleHandleA("user32.dll"), "CreateSyntheticPointerDevice") != nullptr) {
|
||||
caps |= platform_caps::pen_touch;
|
||||
if (config::input.native_pen_touch) {
|
||||
caps |= platform_caps::pen_touch;
|
||||
}
|
||||
}
|
||||
else {
|
||||
BOOST_LOG(warning) << "Touch input requires Windows 10 1809 or later"sv;
|
||||
|
||||
Reference in New Issue
Block a user