-static inline float vg_get_axis( const char *axis );
-static inline int vg_get_button( const char *button );
+VG_STATIC inline float vg_get_axis( const char *axis );
+VG_STATIC inline int vg_get_button( const char *button );
-static inline int vg_get_button_down( const char *button );
-static inline int vg_get_button_up( const char *button );
+VG_STATIC inline int vg_get_button_down( const char *button );
+VG_STATIC inline int vg_get_button_up( const char *button );
{
for( int i = 0; i < vg_list_size( vg_axis_binds ); i ++ )
if( !strcmp( axis, vg_axis_binds[i].name ) )
return vg_axis_binds[i].value;
}
{
for( int i = 0; i < vg_list_size( vg_axis_binds ); i ++ )
if( !strcmp( axis, vg_axis_binds[i].name ) )
return vg_axis_binds[i].value;
}
{
for( int i=0; i<vg_list_size(vg_button_binds); i ++ )
if( !strcmp(button,vg_button_binds[i].name) )
{
for( int i=0; i<vg_list_size(vg_button_binds); i ++ )
if( !strcmp(button,vg_button_binds[i].name) )
{
for( int i=0; i<vg_list_size(vg_controller_binds); i ++ )
if( !strcmp(button,vg_controller_binds[i].name) )
{
for( int i=0; i<vg_list_size(vg_controller_binds); i ++ )
if( !strcmp(button,vg_controller_binds[i].name) )
{
struct button_binding *bind = vg_get_button_ptr( name ),
*bindc = vg_get_button_ptr_c( name );
{
struct button_binding *bind = vg_get_button_ptr( name ),
*bindc = vg_get_button_ptr_c( name );
{
if(vg_get_button_down( button )) return k_button_state_down;
if(vg_get_button_up( button )) return k_button_state_up;
{
if(vg_get_button_down( button )) return k_button_state_down;
if(vg_get_button_up( button )) return k_button_state_up;
{
vg_static_assert( GLFW_MOUSE_BUTTON_LAST < GLFW_KEY_SPACE,
"GLFW: Mouse has too many buttons" );
{
vg_static_assert( GLFW_MOUSE_BUTTON_LAST < GLFW_KEY_SPACE,
"GLFW: Mouse has too many buttons" );
void vg_update_inputs(void)
{
if( !glfwGetGamepadState( GLFW_JOYSTICK_1, &vg.gamepad) )
void vg_update_inputs(void)
{
if( !glfwGetGamepadState( GLFW_JOYSTICK_1, &vg.gamepad) )