projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
my fucking fingers
[carveJwlIkooP6JGAAIwe30JlM.git]
/
input.h
diff --git
a/input.h
b/input.h
index dffcb28235221648b4250c63eb60359801b088ce..a909d7b70e537a94c8830a3b94413e46ef7ceb98 100644
(file)
--- a/
input.h
+++ b/
input.h
@@
-179,11
+179,8
@@
static const char *joystick_display_string( enum sr_joystick joystick )
static int buttons_filter_fixed(void)
{
static int buttons_filter_fixed(void)
{
- if( srinput.ignore_input_frames )
- return 1;
-
- if( vg_console.enabled )
- return 1;
+ if( srinput.ignore_input_frames ) return 1;
+ if( vg_ui.wants_mouse ) return 1;
if( vg.engine_stage == k_engine_stage_update_fixed )
if( vg.fixed_iterations > 0 )
if( vg.engine_stage == k_engine_stage_update_fixed )
if( vg.fixed_iterations > 0 )
@@
-195,8
+192,7
@@
static int buttons_filter_fixed(void)
/* Rising edge of button */
static int button_down( enum sr_bind button )
{
/* Rising edge of button */
static int button_down( enum sr_bind button )
{
- if( buttons_filter_fixed() )
- return 0;
+ if( buttons_filter_fixed() ) return 0;
if( srinput.button_states[ button ][0] &&
!srinput.button_states[ button ][1] )
if( srinput.button_states[ button ][0] &&
!srinput.button_states[ button ][1] )
@@
-208,8
+204,7
@@
static int button_down( enum sr_bind button )
/* Falling edge of button */
static int button_up( enum sr_bind button )
{
/* Falling edge of button */
static int button_up( enum sr_bind button )
{
- if( buttons_filter_fixed() )
- return 0;
+ if( buttons_filter_fixed() ) return 0;
if( !srinput.button_states[ button ][0] &&
srinput.button_states[ button ][1] )
if( !srinput.button_states[ button ][0] &&
srinput.button_states[ button ][1] )
@@
-221,15
+216,13
@@
static int button_up( enum sr_bind button )
/* State of button */
static int button_press( enum sr_bind button )
{
/* State of button */
static int button_press( enum sr_bind button )
{
- if( vg_console.enabled )
- return 0;
-
+ if( vg_ui.wants_mouse ) return 0;
return srinput.button_states[ button ][0];
}
static void joystick_state( enum sr_joystick joystick, v2f state )
{
return srinput.button_states[ button ][0];
}
static void joystick_state( enum sr_joystick joystick, v2f state )
{
- if( vg_
console.enabled
)
+ if( vg_
ui.wants_mouse
)
v2_zero( state );
else
v2_copy( srinput.joystick_states[ joystick ][0], state );
v2_zero( state );
else
v2_copy( srinput.joystick_states[ joystick ][0], state );
@@
-237,7
+230,7
@@
static void joystick_state( enum sr_joystick joystick, v2f state )
static float axis_state( enum sr_axis axis )
{
static float axis_state( enum sr_axis axis )
{
- if( vg_
console.enabled
) return 0.0f;
+ if( vg_
ui.wants_mouse
) return 0.0f;
else return srinput.axis_states[axis][0];
}
else return srinput.axis_states[axis][0];
}
@@
-312,7
+305,7
@@
static void skaterift_preupdate_inputs(void)
if( vg_getkey( SDLK_RIGHT ) )
srinput.axis_states[ k_sraxis_mbrowse_h ][0] += 1.0f;
if( vg_getkey( SDLK_RIGHT ) )
srinput.axis_states[ k_sraxis_mbrowse_h ][0] += 1.0f;
- if( vg_input.active_controller_index
!= -1
){
+ if( vg_input.active_controller_index
>= 0
){
struct vg_controller *controller =
&vg_input.controllers[vg_input.active_controller_index];
struct vg_controller *controller =
&vg_input.controllers[vg_input.active_controller_index];