From f595bcadb2305d5bbc5ea945935a42bcfbf6bdb1 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 5 Aug 2025 10:44:49 -0400 Subject: Interface for scaling scroll values at time of use - Add MOVE cursor. - Build fixes. Signed-off-by: Andrew Opalach --- tests/window.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/window.c b/tests/window.c index e13f1fa..e1c5de1 100644 --- a/tests/window.c +++ b/tests/window.c @@ -3,11 +3,10 @@ #include #include #include +#include #include #include #include -#define _USE_MATH_DEFINES -#include #define DEFAULT_WIDTH 720 #define DEFAULT_HEIGHT 480 @@ -23,13 +22,6 @@ static const GLfloat init_rotation[] = { -25.f, 35.f, 0.f }; static GLfloat rotation[] = { init_rotation[0], init_rotation[1], init_rotation[2] }; static GLfloat zoom = 0.5f; -AL_IGNORE_WARNING("-Wunused-function") -static inline GLfloat degrees_to_radians(GLfloat degrees) -{ - return degrees * M_PI / 180.f; -} -AL_IGNORE_WARNING_END - static bool pointer_pos_callback(void *userdata, f64 x, f64 y) { (void)userdata; @@ -60,7 +52,7 @@ static bool pointer_pos_callback(void *userdata, f64 x, f64 y) static bool scroll_callback(void *userdata, f64 y) { (void)userdata; - zoom += y / -2500.f; + zoom += (f32)stl_scale_scroll(y, 50.0); if (zoom < 0.1f) zoom = 0.1f; return true; } -- cgit v1.2.3-101-g0448