mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-21 10:11:01 +00:00
Also allow using "Pad Y" for leftclick in menus
This commit is contained in:
parent
9e8d399257
commit
5b8e67762b
2 changed files with 5 additions and 4 deletions
neo
|
@ -431,7 +431,6 @@ idCVar idUsercmdGenLocal::m_showMouseRate( "m_showMouseRate", "0", CVAR_SYSTEM |
|
|||
|
||||
idCVar joy_triggerThreshold( "joy_triggerThreshold", "0.05", CVAR_FLOAT | CVAR_ARCHIVE, "how far the joystick triggers have to be pressed before they register as down" );
|
||||
idCVar joy_deadZone( "joy_deadZone", "0.25", CVAR_FLOAT | CVAR_ARCHIVE, "specifies how large the dead-zone is on the joystick" );
|
||||
idCVar joy_range( "joy_range", "1.0", CVAR_FLOAT | CVAR_ARCHIVE, "allow full range to be mapped to a smaller offset" );
|
||||
idCVar joy_gammaLook( "joy_gammaLook", "1", CVAR_INTEGER | CVAR_ARCHIVE, "use a log curve instead of a power curve for movement" );
|
||||
idCVar joy_powerScale( "joy_powerScale", "2", CVAR_FLOAT | CVAR_ARCHIVE, "Raise joystick values to this power" );
|
||||
idCVar joy_pitchSpeed( "joy_pitchSpeed", "130", CVAR_ARCHIVE | CVAR_FLOAT, "pitch speed when pressing up or down on the joystick", 60, 600 );
|
||||
|
@ -466,6 +465,8 @@ idUsercmdGenLocal::idUsercmdGenLocal( void ) {
|
|||
toggled_zoom.Clear();
|
||||
toggled_run.on = in_alwaysRun.GetBool();
|
||||
|
||||
lastLookValuePitch = lastLookValueYaw = 0.0f;
|
||||
|
||||
ClearAngles();
|
||||
Clear();
|
||||
}
|
||||
|
|
|
@ -1386,12 +1386,12 @@ sysEvent_t Sys_GetEvent() {
|
|||
if ( ev.cbutton.button == SDL_CONTROLLER_BUTTON_START ) {
|
||||
res.evValue = K_ESCAPE;
|
||||
return res;
|
||||
} else if( ev.cbutton.button == SDL_CONTROLLER_BUTTON_A
|
||||
} else if( (ev.cbutton.button == SDL_CONTROLLER_BUTTON_A || ev.cbutton.button == SDL_CONTROLLER_BUTTON_Y)
|
||||
&& D3_IN_interactiveIngameGuiActive && sessLocal.GetActiveMenu() == NULL )
|
||||
{
|
||||
// ugly hack: currently an interactive ingame GUI (with a cursor) is active/focused
|
||||
// so pretend that the gamepads A (south) button is the left mouse button
|
||||
// so it can be used for "clicking"..
|
||||
// so pretend that the gamepads A (south) or Y (north, used by D3BFG to click ingame GUIs) button
|
||||
// is the left mouse button so it can be used for "clicking"..
|
||||
mouse_polls.Append( mouse_poll_t(M_ACTION1, res.evValue2) );
|
||||
res.evValue = K_MOUSE1;
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue