X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vg%2Fvg_input.h;h=62dd4b15b39f381737d9a4f03f42da746541fd0f;hb=f41ad9a5cd33c68bab59f2818416b8b6e8b632ae;hp=4d1ac0e31f68fbc1035ec26b2606df62165959d0;hpb=27f1751d523e9dee4ab00ec10666bbb3d8db74bc;p=fishladder.git diff --git a/vg/vg_input.h b/vg/vg_input.h index 4d1ac0e..62dd4b1 100644 --- a/vg/vg_input.h +++ b/vg/vg_input.h @@ -70,21 +70,23 @@ static inline struct button_binding *vg_get_button_ptr( const char *button ) } #pragma GCC diagnostic pop +static int vg_console_enabled(void); + static inline int vg_get_button( const char *button ) { - return vg_get_button_ptr( button )->value; + return vg_get_button_ptr( button )->value && !vg_console_enabled(); } static inline int vg_get_button_down( const char *button ) { struct button_binding *bind = vg_get_button_ptr( button ); - return bind->value & (bind->value ^ bind->prev); + return bind->value & (bind->value ^ bind->prev) && !vg_console_enabled(); } static inline int vg_get_button_up( const char *button ) { struct button_binding *bind = vg_get_button_ptr( button ); - return bind->prev & (bind->value ^ bind->prev); + return bind->prev & (bind->value ^ bind->prev) && !vg_console_enabled(); } static inline int key_is_keyboard( int const id )