diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/window.c | 12 |
1 files changed, 2 insertions, 10 deletions
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 <al/types.h> #include <al/array.h> #include <al/str.h> +#include <al/math.h> #include <stl/window.h> #include <stl/gl.h> #include <nnwt/common.h> -#define _USE_MATH_DEFINES -#include <math.h> #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; } |