From 4976c76e86635afb20752f4d49200964a51cb99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20B=C3=A9rub=C3=A9?= Date: Wed, 11 Dec 2024 05:14:29 +0000 Subject: [PATCH] Allowing an alternate notation to set region coordinates --- src/server.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/server.c b/src/server.c index ba8bac7..3d2bdc5 100644 --- a/src/server.c +++ b/src/server.c @@ -1126,6 +1126,13 @@ void respond_request(struct Request *req) { if (remain != value) osds[id].posy = result; } + else if (EQUALS(key, "pos")) { + int x, y; + if (sscanf(value, "%d,%d", &x, &y) == 2) { + osds[id].posx = x; + osds[id].posy = y; + } + } } osds[id].updt = 1; }