X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vg_input.h;h=e9ae65b1971c9d714e174e19e1a7bc0b1552f9b2;hb=76d234b7dc5e6500e8a54009b367e7620f11ef97;hp=ecf2432a98cb05ff8ca30053d5e0414a416515bd;hpb=7c3a4ae26aa3fd706ac61445dce243b542103e12;p=vg.git diff --git a/vg_input.h b/vg_input.h index ecf2432..e9ae65b 100644 --- a/vg_input.h +++ b/vg_input.h @@ -7,7 +7,7 @@ #define VG_MAX_CONTROLLERS 4 -VG_STATIC float controller_deadzone = 0.05f; +static float controller_deadzone = 0.05f; struct{ const u8 *sdl_keys; @@ -35,7 +35,7 @@ struct{ } static vg_input = { .active_controller_index = -2 }; -VG_STATIC u8 vg_getkey( SDL_Keycode kc ) +static u8 vg_getkey( SDL_Keycode kc ) { SDL_Scancode sc = SDL_GetScancodeFromKey( kc ); return vg_input.sdl_keys[sc]; @@ -44,7 +44,7 @@ VG_STATIC u8 vg_getkey( SDL_Keycode kc ) /* * takes SDL device index, and tries to open that on any free channel */ -VG_STATIC int vg_open_gamecontroller( Sint32 index ) +static int vg_open_gamecontroller( Sint32 index ) { struct vg_controller *controller = NULL; int vg_id = 0; @@ -113,7 +113,7 @@ VG_STATIC int vg_open_gamecontroller( Sint32 index ) } } -VG_STATIC void vg_input_device_event( SDL_Event *ev ) +static void vg_input_device_event( SDL_Event *ev ) { if( ev->type == SDL_CONTROLLERDEVICEADDED ){ int is_controller = SDL_IsGameController( ev->cdevice.which ); @@ -154,7 +154,7 @@ VG_STATIC void vg_input_device_event( SDL_Event *ev ) } } -VG_STATIC void vg_input_controller_event( SDL_Event *ev ) +static void vg_input_controller_event( SDL_Event *ev ) { if( ev->type == SDL_CONTROLLERAXISMOTION ){ for( int i=0; i