Skip to content

Commit

Permalink
Use env_to_bool for check
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo authored and BoukeHaarsma23 committed Mar 14, 2024
1 parent a04c71b commit 2f90f9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wlserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@

static LogScope wl_log("wlserver");

extern bool env_to_bool(const char *env);

struct wlserver_t wlserver = {
.touch_down_ids = {}
};
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2f90f9d

Please sign in to comment.