summaryrefslogtreecommitdiff
path: root/src/platform_sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform_sdl.c')
-rw-r--r--src/platform_sdl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/platform_sdl.c b/src/platform_sdl.c
index f31bc58..f6bc08e 100644
--- a/src/platform_sdl.c
+++ b/src/platform_sdl.c
@@ -69,6 +69,7 @@ void clear_screen(struct SDLOffscreenBuffer *buffer, uint32_t pixel_value)
}
+// TODO: make the deadzone circular
float sdl_process_controller_axis_value(int16_t value, int16_t deadzone_threshold)
{
float result = 0.0;
@@ -120,11 +121,11 @@ bool sdl_handle_event(SDL_Event *event, struct GameControllerInput *controller_i
// down and right are positive
float normalized_axis_value = sdl_process_controller_axis_value(event->caxis.value, DEADZONE_THRESHOLD);
- printf("SDL_CONTROLLERAXISMOTION (%d, %s, %d, %f)\n",
- event->caxis.which,
- SDL_GameControllerGetStringForAxis(event->caxis.axis),
- event->caxis.value,
- normalized_axis_value);
+ //printf("SDL_CONTROLLERAXISMOTION (%d, %s, %d, %f)\n",
+ // event->caxis.which,
+ // SDL_GameControllerGetStringForAxis(event->caxis.axis),
+ // event->caxis.value,
+ // normalized_axis_value);
switch(event->caxis.axis)
{