From 4c7a1de6a7623d0cb5c5018939c98a817bbccf92 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 09b22ebbe7..a73374ee38 100644 --- a/src/wlserver.cpp +++ b/src/wlserver.cpp @@ -66,6 +66,8 @@ static LogScope wl_log("wlserver"); +extern bool env_to_bool(const char *env); + struct wlserver_t wlserver = { .touch_down_ids = {} }; @@ -2082,7 +2084,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