From 2f90f9d05ee5d653372c256f6d7cf7e78b95f936 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 11 Feb 2024 15:51:11 -0800 Subject: [PATCH] Use env_to_bool for check --- src/wlserver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wlserver.cpp b/src/wlserver.cpp index f70085acb..be2a82fc1 100644 --- a/src/wlserver.cpp +++ b/src/wlserver.cpp @@ -61,6 +61,8 @@ static LogScope wl_log("wlserver"); +extern bool env_to_bool(const char *env); + struct wlserver_t wlserver = { .touch_down_ids = {} }; @@ -2115,7 +2117,7 @@ void wlserver_touchmotion( double x, double y, int touch_id, uint32_t time ) { wlr_seat_touch_notify_motion( wlserver.wlr.seat, time, touch_id, wlserver.mouse_surface_cursorx, wlserver.mouse_surface_cursory ); - if(!getenv("GAMESCOPE_DISABLE_TOUCH_GESTURES")) { + if (!env_to_bool(getenv("GAMESCOPE_DISABLE_TOUCH_GESTURES"))) { bool start_gesture = false; // Round the x-coordinate to the nearest whole number