static void IN_CrouchDown (void) { if (Key_GetDest() == key_game) { // int state = in_crouch.state; KeyDown(&in_crouch); // if (!(state & 1) && (in_crouch.state & 1)) // in_impulse = 22; } }
void Host_Quit_f (void) { if (Key_GetDest() != key_console && /* quit without asking if we aren't connected -- Steve */ /* cls.state != ca_dedicated */ cls.state == ca_connected) { M_Menu_Quit_f (); return; } CL_Disconnect (); Host_ShutdownServer(false); Sys_Quit (); }
static void mouse_wheel_event( int delta ) { UINT lines, key; // FIXME: handle WHEEL_DELTA and partial scrolls... if( delta > 0 ) { key = K_MWHEELUP; } else if( delta < 0 ) { key = K_MWHEELDOWN; } else { return; } if( Key_GetDest() & KEY_CONSOLE ) { SystemParametersInfo( SPI_GETWHEELSCROLLLINES, 0, &lines, 0 ); clamp( lines, 1, 9 ); } else { lines = 1; } do { Key_Event( key, qtrue, win.lastMsgTime ); Key_Event( key, qfalse, win.lastMsgTime ); } while( --lines ); }