* Some debug stuff (now commented in) used to debug joystick/gamepad events.

This commit is contained in:
Wintermute0110 2014-11-20 06:13:07 +09:00
parent d8c8412e7a
commit 46180de310
2 changed files with 20 additions and 1 deletions

View file

@ -551,6 +551,19 @@ void idCmdSystemLocal::ExecuteTokenizedString( const idCmdArgs& args )
return; // no tokens
}
// DEBUG: print commands executed by the console
/*
if(args.Argc() == 1) {
common->Printf("idCmdSystemLocal::ExecuteTokenizedString: '%s'\n", args.Argv( 0 ));
}
else if(args.Argc() == 2) {
common->Printf("idCmdSystemLocal::ExecuteTokenizedString: '%s' '%s'\n", args.Argv( 0 ), args.Argv( 1 ));
}
else if(args.Argc() == 3) {
common->Printf("idCmdSystemLocal::ExecuteTokenizedString: '%s' '%s' '%s'\n", args.Argv( 0 ), args.Argv( 1 ), args.Argv( 2 ));
}
*/
// check registered command functions
for( prev = &commands; *prev; prev = &cmd->next )
{

View file

@ -1423,7 +1423,11 @@ idUsercmdGenLocal::Joystick
void idUsercmdGenLocal::Joystick( int deviceNum )
{
int numEvents = Sys_PollJoystickInputEvents( deviceNum );
// if(numEvents) {
// common->Printf("idUsercmdGenLocal::Joystick: numEvents = %i\n", numEvents);
// }
// Study each of the buffer elements and process them.
for( int i = 0; i < numEvents; i++ )
{
@ -1431,6 +1435,8 @@ void idUsercmdGenLocal::Joystick( int deviceNum )
int value;
if( Sys_ReturnJoystickInputEvent( i, action, value ) )
{
// common->Printf("idUsercmdGenLocal::Joystick: i = %i / action = %i / value = %i\n", i, action, value);
if( action >= J_ACTION1 && action <= J_ACTION_MAX )
{
int joyButton = K_JOY1 + ( action - J_ACTION1 );