Add in_skipplayerone cvar (matching QE).
This commit is contained in:
parent
75166b0815
commit
f4602d3ec7
3 changed files with 8 additions and 3 deletions
|
@ -151,6 +151,8 @@ void joy_radialdeadzone_cb(cvar_t *var, char *oldvalue)
|
|||
#endif
|
||||
static cvar_t joy_radialdeadzone = CVARCD("joyradialdeadzone", "", joy_radialdeadzone_cb, "Treat controller dead zones as a pair, rather than per-axis.");
|
||||
|
||||
cvar_t in_skipplayerone = CVARD("in_skipplayerone", "1", "Do not auto-assign joysticks/game-controllers to the first player. Requires in_restart to take effect."); //FIXME: this needs to be able to change deviceids when changed. until then menus will need to in_restart.
|
||||
|
||||
|
||||
#define EVENTQUEUELENGTH 1024
|
||||
static struct eventlist_s
|
||||
|
@ -380,6 +382,7 @@ void IN_Init(void)
|
|||
}
|
||||
Cvar_Register (&joy_exponent, "input controls");
|
||||
Cvar_Register (&joy_radialdeadzone, "input controls");
|
||||
Cvar_Register (&in_skipplayerone, "input controls");
|
||||
|
||||
Cmd_AddCommand ("in_deviceids", IN_DeviceIDs_f);
|
||||
|
||||
|
|
|
@ -162,7 +162,8 @@ static cvar_t joy_only = CVARD("joyonly", "0", "If true, treats \"game controlle
|
|||
//the enumid is the value for the open function rather than the working id.
|
||||
static void J_AllocateDevID(struct sdljoy_s *joy)
|
||||
{
|
||||
unsigned int id = 0, j;
|
||||
extern cvar_t in_skipplayerone;
|
||||
unsigned int id = (in_skipplayerone.ival?1:0), j;
|
||||
for (j = 0; j < MAX_JOYSTICKS;)
|
||||
{
|
||||
if (sdljoy[j++].qdevid == id)
|
||||
|
|
|
@ -447,8 +447,9 @@ static void INS_HideMouse (void)
|
|||
static int Joy_AllocateDevID(void)
|
||||
{
|
||||
extern cvar_t cl_splitscreen;
|
||||
int id = 0, j;
|
||||
for (id = 0; ; id++)
|
||||
extern cvar_t in_skipplayerone;
|
||||
int id = (in_skipplayerone.ival?1:0), j;
|
||||
for ( ; ; id++)
|
||||
{
|
||||
for (j = 0; j < joy_count; j++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue