From 44e65f78fca1597471d31a96907d5be465ca1ec1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 22 Jan 2025 18:42:13 -0500 Subject: Factor out puglIsValidPosition() --- src/common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/common.c') diff --git a/src/common.c b/src/common.c index 8c2268b..2e6e0e6 100644 --- a/src/common.c +++ b/src/common.c @@ -12,7 +12,6 @@ #include #include -#include #include #include @@ -302,7 +301,7 @@ puglGetFrame(const PuglView* view) // Get the default position if set, or fallback to (0, 0) int x = view->defaultX; int y = view->defaultY; - if (x < INT16_MIN || x > INT16_MAX || y < INT16_MIN || y > INT16_MAX) { + if (!puglIsValidPosition(x, y)) { x = 0; y = 0; } -- cgit v1.2.1