From a36902f2c1b29f7f567708f4d9469e0bf6563e47 Mon Sep 17 00:00:00 2001 From: Hansem Ro Date: Tue, 19 Jul 2022 15:13:35 -0700 Subject: [PATCH] [3.x, X11] Do case-insensitive search for pen inversion detection --- platform/x11/os_x11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index dd50019a98c..47a1cde9402 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -739,7 +739,7 @@ bool OS_X11::refresh_device_info() { xi.pen_pressure_range[dev->deviceid] = Vector2(pressure_min, pressure_max); xi.pen_tilt_x_range[dev->deviceid] = Vector2(tilt_x_min, tilt_x_max); xi.pen_tilt_y_range[dev->deviceid] = Vector2(tilt_y_min, tilt_y_max); - xi.pen_inverted_devices[dev->deviceid] = (bool)strstr(dev->name, "eraser"); + xi.pen_inverted_devices[dev->deviceid] = String(dev->name).findn("eraser") > 0; } XIFreeDeviceInfo(info);