* Demote input related console information to developer only so that it doesn't

spam the console every time input settings are changed
This commit is contained in:
Tim Angus 2007-08-24 13:54:23 +00:00
parent 5c66129790
commit 6993861080
4 changed files with 53 additions and 53 deletions

View file

@ -1769,7 +1769,7 @@ void GLimp_WakeRenderer( void *data ) {}
/*****************************************************************************/ /*****************************************************************************/
void IN_Init(void) { void IN_Init(void) {
Com_Printf ("\n------- Input Initialization -------\n"); Com_DPrintf ("\n------- Input Initialization -------\n");
// mouse variables // mouse variables
in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE); in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE);
in_dgamouse = Cvar_Get ("in_dgamouse", "1", CVAR_ARCHIVE); in_dgamouse = Cvar_Get ("in_dgamouse", "1", CVAR_ARCHIVE);
@ -1795,7 +1795,7 @@ void IN_Init(void) {
mouse_avail = qfalse; mouse_avail = qfalse;
IN_StartupJoystick( ); // bk001130 - from cvs1.17 (mkv) IN_StartupJoystick( ); // bk001130 - from cvs1.17 (mkv)
Com_Printf ("------------------------------------\n"); Com_DPrintf ("------------------------------------\n");
} }
void IN_Shutdown(void) void IN_Shutdown(void)

View file

@ -76,7 +76,7 @@ void IN_StartupJoystick( void )
joy_fd = -1; joy_fd = -1;
if( !in_joystick->integer ) { if( !in_joystick->integer ) {
Com_Printf( "Joystick is not active.\n" ); Com_DPrintf( "Joystick is not active.\n" );
return; return;
} }
@ -94,7 +94,7 @@ void IN_StartupJoystick( void )
char name[128]; char name[128];
int n = -1; int n = -1;
Com_Printf( "Joystick %s found\n", filename ); Com_DPrintf( "Joystick %s found\n", filename );
/* Get rid of initialization messages. */ /* Get rid of initialization messages. */
do { do {
@ -114,9 +114,9 @@ void IN_StartupJoystick( void )
strncpy( name, "Unknown", sizeof( name ) ); strncpy( name, "Unknown", sizeof( name ) );
} }
Com_Printf( "Name: %s\n", name ); Com_DPrintf( "Name: %s\n", name );
Com_Printf( "Axes: %d\n", axes ); Com_DPrintf( "Axes: %d\n", axes );
Com_Printf( "Buttons: %d\n", buttons ); Com_DPrintf( "Buttons: %d\n", buttons );
/* Our work here is done. */ /* Our work here is done. */
return; return;
@ -126,7 +126,7 @@ void IN_StartupJoystick( void )
/* No soup for you. */ /* No soup for you. */
if( joy_fd == -1 ) { if( joy_fd == -1 ) {
Com_Printf( "No joystick found.\n" ); Com_DPrintf( "No joystick found.\n" );
return; return;
} }

View file

@ -1438,7 +1438,7 @@ void GLimp_WakeRenderer( void *data ) {}
/*****************************************************************************/ /*****************************************************************************/
void IN_Init(void) { void IN_Init(void) {
Com_Printf ("\n------- Input Initialization -------\n"); Com_DPrintf ("\n------- Input Initialization -------\n");
// mouse variables // mouse variables
in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE); in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE);
in_disablemacosxmouseaccel = Cvar_Get ("in_disablemacosxmouseaccel", "1", CVAR_ARCHIVE); in_disablemacosxmouseaccel = Cvar_Get ("in_disablemacosxmouseaccel", "1", CVAR_ARCHIVE);
@ -1467,7 +1467,7 @@ void IN_Init(void) {
mouse_avail = qfalse; mouse_avail = qfalse;
IN_StartupJoystick( ); // bk001130 - from cvs1.17 (mkv) IN_StartupJoystick( ); // bk001130 - from cvs1.17 (mkv)
Com_Printf ("------------------------------------\n"); Com_DPrintf ("------------------------------------\n");
} }
void IN_Shutdown(void) void IN_Shutdown(void)
@ -1582,25 +1582,25 @@ void IN_StartupJoystick( void )
memset(&stick_state, '\0', sizeof (stick_state)); memset(&stick_state, '\0', sizeof (stick_state));
if( !in_joystick->integer ) { if( !in_joystick->integer ) {
Com_Printf( "Joystick is not active.\n" ); Com_DPrintf( "Joystick is not active.\n" );
return; return;
} }
if (!SDL_WasInit(SDL_INIT_JOYSTICK)) if (!SDL_WasInit(SDL_INIT_JOYSTICK))
{ {
Com_Printf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n"); Com_DPrintf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n");
if (SDL_Init(SDL_INIT_JOYSTICK) == -1) if (SDL_Init(SDL_INIT_JOYSTICK) == -1)
{ {
Com_Printf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError()); Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError());
return; return;
} }
Com_Printf("SDL_Init(SDL_INIT_JOYSTICK) passed.\n"); Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) passed.\n");
} }
total = SDL_NumJoysticks(); total = SDL_NumJoysticks();
Com_Printf("I see %d possible joysticks\n", total); Com_DPrintf("%d possible joysticks\n", total);
for (i = 0; i < total; i++) for (i = 0; i < total; i++)
Com_Printf("[%d] %s\n", i, SDL_JoystickName(i)); Com_DPrintf("[%d] %s\n", i, SDL_JoystickName(i));
in_joystickNo = Cvar_Get( "in_joystickNo", "0", CVAR_ARCHIVE ); in_joystickNo = Cvar_Get( "in_joystickNo", "0", CVAR_ARCHIVE );
if( in_joystickNo->integer < 0 || in_joystickNo->integer >= total ) if( in_joystickNo->integer < 0 || in_joystickNo->integer >= total )
@ -1609,16 +1609,16 @@ void IN_StartupJoystick( void )
stick = SDL_JoystickOpen( in_joystickNo->integer ); stick = SDL_JoystickOpen( in_joystickNo->integer );
if (stick == NULL) { if (stick == NULL) {
Com_Printf( "No joystick opened.\n" ); Com_DPrintf( "No joystick opened.\n" );
return; return;
} }
Com_Printf( "Joystick %d opened\n", in_joystickNo->integer ); Com_DPrintf( "Joystick %d opened\n", in_joystickNo->integer );
Com_Printf( "Name: %s\n", SDL_JoystickName(in_joystickNo->integer) ); Com_DPrintf( "Name: %s\n", SDL_JoystickName(in_joystickNo->integer) );
Com_Printf( "Axes: %d\n", SDL_JoystickNumAxes(stick) ); Com_DPrintf( "Axes: %d\n", SDL_JoystickNumAxes(stick) );
Com_Printf( "Hats: %d\n", SDL_JoystickNumHats(stick) ); Com_DPrintf( "Hats: %d\n", SDL_JoystickNumHats(stick) );
Com_Printf( "Buttons: %d\n", SDL_JoystickNumButtons(stick) ); Com_DPrintf( "Buttons: %d\n", SDL_JoystickNumButtons(stick) );
Com_Printf( "Balls: %d\n", SDL_JoystickNumBalls(stick) ); Com_DPrintf( "Balls: %d\n", SDL_JoystickNumBalls(stick) );
SDL_JoystickEventState(SDL_QUERY); SDL_JoystickEventState(SDL_QUERY);

View file

@ -267,13 +267,13 @@ qboolean IN_InitDIMouse( void ) {
DINPUT_BUFFERSIZE, // dwData DINPUT_BUFFERSIZE, // dwData
}; };
Com_Printf( "Initializing DirectInput...\n"); Com_DPrintf( "Initializing DirectInput...\n");
if (!hInstDI) { if (!hInstDI) {
hInstDI = LoadLibrary("dinput.dll"); hInstDI = LoadLibrary("dinput.dll");
if (hInstDI == NULL) { if (hInstDI == NULL) {
Com_Printf ("Couldn't load dinput.dll\n"); Com_DPrintf ("Couldn't load dinput.dll\n");
return qfalse; return qfalse;
} }
} }
@ -283,7 +283,7 @@ qboolean IN_InitDIMouse( void ) {
GetProcAddress(hInstDI,"DirectInputCreateA"); GetProcAddress(hInstDI,"DirectInputCreateA");
if (!pDirectInputCreate) { if (!pDirectInputCreate) {
Com_Printf ("Couldn't get DI proc addr\n"); Com_DPrintf ("Couldn't get DI proc addr\n");
return qfalse; return qfalse;
} }
} }
@ -292,7 +292,7 @@ qboolean IN_InitDIMouse( void ) {
hr = iDirectInputCreate( g_wv.hInstance, DIRECTINPUT_VERSION, &g_pdi, NULL); hr = iDirectInputCreate( g_wv.hInstance, DIRECTINPUT_VERSION, &g_pdi, NULL);
if (FAILED(hr)) { if (FAILED(hr)) {
Com_Printf ("iDirectInputCreate failed\n"); Com_DPrintf ("iDirectInputCreate failed\n");
return qfalse; return qfalse;
} }
@ -300,7 +300,7 @@ qboolean IN_InitDIMouse( void ) {
hr = IDirectInput_CreateDevice(g_pdi, &GUID_SysMouse, &g_pMouse, NULL); hr = IDirectInput_CreateDevice(g_pdi, &GUID_SysMouse, &g_pMouse, NULL);
if (FAILED(hr)) { if (FAILED(hr)) {
Com_Printf ("Couldn't open DI mouse device\n"); Com_DPrintf ("Couldn't open DI mouse device\n");
return qfalse; return qfalse;
} }
@ -308,7 +308,7 @@ qboolean IN_InitDIMouse( void ) {
hr = IDirectInputDevice_SetDataFormat(g_pMouse, &df); hr = IDirectInputDevice_SetDataFormat(g_pMouse, &df);
if (FAILED(hr)) { if (FAILED(hr)) {
Com_Printf ("Couldn't set DI mouse format\n"); Com_DPrintf ("Couldn't set DI mouse format\n");
return qfalse; return qfalse;
} }
@ -318,7 +318,7 @@ qboolean IN_InitDIMouse( void ) {
// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=50 // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=50
if (FAILED(hr)) { if (FAILED(hr)) {
Com_Printf ("Couldn't set DI coop level\n"); Com_DPrintf ("Couldn't set DI coop level\n");
return qfalse; return qfalse;
} }
@ -328,7 +328,7 @@ qboolean IN_InitDIMouse( void ) {
hr = IDirectInputDevice_SetProperty(g_pMouse, DIPROP_BUFFERSIZE, &dipdw.diph); hr = IDirectInputDevice_SetProperty(g_pMouse, DIPROP_BUFFERSIZE, &dipdw.diph);
if (FAILED(hr)) { if (FAILED(hr)) {
Com_Printf ("Couldn't set DI buffersize\n"); Com_DPrintf ("Couldn't set DI buffersize\n");
return qfalse; return qfalse;
} }
@ -336,7 +336,7 @@ qboolean IN_InitDIMouse( void ) {
IN_DIMouse( &x, &y ); IN_DIMouse( &x, &y );
IN_DIMouse( &x, &y ); IN_DIMouse( &x, &y );
Com_Printf( "DirectInput initialized.\n"); Com_DPrintf( "DirectInput initialized.\n");
return qtrue; return qtrue;
} }
@ -557,7 +557,7 @@ void IN_StartupMouse( void )
s_wmv.mouseStartupDelayed = qfalse; s_wmv.mouseStartupDelayed = qfalse;
if ( in_mouse->integer == 0 ) { if ( in_mouse->integer == 0 ) {
Com_Printf ("Mouse control not active.\n"); Com_DPrintf ("Mouse control not active.\n");
return; return;
} }
@ -565,16 +565,16 @@ void IN_StartupMouse( void )
if ( ( g_wv.osversion.dwPlatformId == VER_PLATFORM_WIN32_NT ) && if ( ( g_wv.osversion.dwPlatformId == VER_PLATFORM_WIN32_NT ) &&
( g_wv.osversion.dwMajorVersion == 4 ) ) ( g_wv.osversion.dwMajorVersion == 4 ) )
{ {
Com_Printf ("Disallowing DirectInput on NT 4.0\n"); Com_DPrintf ("Disallowing DirectInput on NT 4.0\n");
Cvar_Set( "in_mouse", "-1" ); Cvar_Set( "in_mouse", "-1" );
} }
if ( in_mouse->integer == -1 ) { if ( in_mouse->integer == -1 ) {
Com_Printf ("Skipping check for DirectInput\n"); Com_DPrintf ("Skipping check for DirectInput\n");
} else { } else {
if (!g_wv.hWnd) if (!g_wv.hWnd)
{ {
Com_Printf ("No window for DirectInput mouse init, delaying\n"); Com_DPrintf ("No window for DirectInput mouse init, delaying\n");
s_wmv.mouseStartupDelayed = qtrue; s_wmv.mouseStartupDelayed = qtrue;
return; return;
} }
@ -582,7 +582,7 @@ void IN_StartupMouse( void )
s_wmv.mouseInitialized = qtrue; s_wmv.mouseInitialized = qtrue;
return; return;
} }
Com_Printf ("Falling back to Win32 mouse support...\n"); Com_DPrintf ("Falling back to Win32 mouse support...\n");
} }
s_wmv.mouseInitialized = qtrue; s_wmv.mouseInitialized = qtrue;
IN_InitWin32Mouse(); IN_InitWin32Mouse();
@ -654,11 +654,11 @@ IN_Startup
=========== ===========
*/ */
void IN_Startup( void ) { void IN_Startup( void ) {
Com_Printf ("\n------- Input Initialization -------\n"); Com_DPrintf ("\n------- Input Initialization -------\n");
IN_StartupMouse (); IN_StartupMouse ();
IN_StartupJoystick (); IN_StartupJoystick ();
IN_StartupMIDI(); IN_StartupMIDI();
Com_Printf ("------------------------------------\n"); Com_DPrintf ("------------------------------------\n");
in_mouse->modified = qfalse; in_mouse->modified = qfalse;
in_joystick->modified = qfalse; in_joystick->modified = qfalse;
@ -802,14 +802,14 @@ void IN_StartupJoystick (void) {
joy.avail = qfalse; joy.avail = qfalse;
if (! in_joystick->integer ) { if (! in_joystick->integer ) {
Com_Printf ("Joystick is not active.\n"); Com_DPrintf ("Joystick is not active.\n");
return; return;
} }
// verify joystick driver is present // verify joystick driver is present
if ((numdevs = joyGetNumDevs ()) == 0) if ((numdevs = joyGetNumDevs ()) == 0)
{ {
Com_Printf ("joystick not found -- driver not present\n"); Com_DPrintf ("joystick not found -- driver not present\n");
return; return;
} }
@ -828,7 +828,7 @@ void IN_StartupJoystick (void) {
// abort startup if we didn't find a valid joystick // abort startup if we didn't find a valid joystick
if (mmr != JOYERR_NOERROR) if (mmr != JOYERR_NOERROR)
{ {
Com_Printf ("joystick not found -- no valid joysticks (%x)\n", mmr); Com_DPrintf ("joystick not found -- no valid joysticks (%x)\n", mmr);
return; return;
} }
@ -837,22 +837,22 @@ void IN_StartupJoystick (void) {
Com_Memset (&joy.jc, 0, sizeof(joy.jc)); Com_Memset (&joy.jc, 0, sizeof(joy.jc));
if ((mmr = joyGetDevCaps (joy.id, &joy.jc, sizeof(joy.jc))) != JOYERR_NOERROR) if ((mmr = joyGetDevCaps (joy.id, &joy.jc, sizeof(joy.jc))) != JOYERR_NOERROR)
{ {
Com_Printf ("joystick not found -- invalid joystick capabilities (%x)\n", mmr); Com_DPrintf ("joystick not found -- invalid joystick capabilities (%x)\n", mmr);
return; return;
} }
Com_Printf( "Joystick found.\n" ); Com_DPrintf( "Joystick found.\n" );
Com_Printf( "Pname: %s\n", joy.jc.szPname ); Com_DPrintf( "Pname: %s\n", joy.jc.szPname );
Com_Printf( "OemVxD: %s\n", joy.jc.szOEMVxD ); Com_DPrintf( "OemVxD: %s\n", joy.jc.szOEMVxD );
Com_Printf( "RegKey: %s\n", joy.jc.szRegKey ); Com_DPrintf( "RegKey: %s\n", joy.jc.szRegKey );
Com_Printf( "Numbuttons: %i / %i\n", joy.jc.wNumButtons, joy.jc.wMaxButtons ); Com_DPrintf( "Numbuttons: %i / %i\n", joy.jc.wNumButtons, joy.jc.wMaxButtons );
Com_Printf( "Axis: %i / %i\n", joy.jc.wNumAxes, joy.jc.wMaxAxes ); Com_DPrintf( "Axis: %i / %i\n", joy.jc.wNumAxes, joy.jc.wMaxAxes );
Com_Printf( "Caps: 0x%x\n", joy.jc.wCaps ); Com_DPrintf( "Caps: 0x%x\n", joy.jc.wCaps );
if ( joy.jc.wCaps & JOYCAPS_HASPOV ) { if ( joy.jc.wCaps & JOYCAPS_HASPOV ) {
Com_Printf( "HASPOV\n" ); Com_DPrintf( "HASPOV\n" );
} else { } else {
Com_Printf( "no POV\n" ); Com_DPrintf( "no POV\n" );
} }
// old button and POV states default to no buttons pressed // old button and POV states default to no buttons pressed
@ -1130,7 +1130,7 @@ static void IN_StartupMIDI( void )
( unsigned long ) NULL, ( unsigned long ) NULL,
CALLBACK_FUNCTION ) != MMSYSERR_NOERROR ) CALLBACK_FUNCTION ) != MMSYSERR_NOERROR )
{ {
Com_Printf( "WARNING: could not open MIDI device %d: '%s'\n", Com_DPrintf( "WARNING: could not open MIDI device %d: '%s'\n",
in_mididevice->integer , s_midiInfo.caps[( int ) in_mididevice->value].szPname ); in_mididevice->integer , s_midiInfo.caps[( int ) in_mididevice->value].szPname );
return; return;
} }