List initialize Controls

This commit is contained in:
Kp 2014-07-04 03:50:50 +00:00
parent bc7a8eb600
commit fda2bf70aa
3 changed files with 3 additions and 3 deletions

View file

@ -740,7 +740,7 @@ static int automap_process_input(window *wind, d_event *event, automap *am)
Controls = am->controls; Controls = am->controls;
kconfig_read_controls(event, 1); kconfig_read_controls(event, 1);
am->controls = Controls; am->controls = Controls;
memset(&Controls, 0, sizeof(control_info)); Controls = {};
if ( !am->controls.state.automap && (am->leave_mode==1) ) if ( !am->controls.state.automap && (am->leave_mode==1) )
{ {

View file

@ -361,7 +361,7 @@ void game_flush_inputs()
joy_flush(); joy_flush();
mouse_flush(); mouse_flush();
mouse_get_delta( &dx, &dy, &dz ); // Read mouse mouse_get_delta( &dx, &dy, &dz ); // Read mouse
memset(&Controls,0,sizeof(control_info)); Controls = {};
} }
/* /*

View file

@ -1480,7 +1480,7 @@ void kconfig_read_controls(d_event *event, int automap_flag)
// --- Don't do anything if in debug mode --- // --- Don't do anything if in debug mode ---
if ( keyd_pressed[KEY_DELETE] ) if ( keyd_pressed[KEY_DELETE] )
{ {
memset( &Controls, 0, sizeof(control_info) ); Controls = {};
return; return;
} }
#endif #endif