mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-19 07:51:03 +00:00
Classic cvar 'in_initjoy' resurrected
Added myself to credits
This commit is contained in:
parent
da31490684
commit
9de55c603d
3 changed files with 15 additions and 4 deletions
|
@ -471,6 +471,10 @@ Set `0` by default.
|
|||
|
||||
## Game Controller
|
||||
|
||||
* **in_initjoy**: Toggles initialization of game controller. Default is
|
||||
`1`, which enables gamepad usage; `0` disables its detection at
|
||||
startup. Can only be set from command line.
|
||||
|
||||
* **in_sdlbackbutton**: Defines which button is used in the gamepad or
|
||||
joystick as the `Esc` key, to access the main menu and 'cancel' /
|
||||
'go back' on its options. Default is `0`, which corresponds to the
|
||||
|
|
|
@ -1618,16 +1618,16 @@ IsCalibrationZero(void)
|
|||
static void
|
||||
IN_Controller_Init(qboolean notify_user)
|
||||
{
|
||||
cvar_t *in_sdlbackbutton;
|
||||
cvar_t *cvar;
|
||||
int nummappings;
|
||||
char controllerdb[MAX_OSPATH] = {0};
|
||||
SDL_Joystick *joystick = NULL;
|
||||
SDL_bool is_controller = SDL_FALSE;
|
||||
|
||||
in_sdlbackbutton = Cvar_Get("in_sdlbackbutton", "0", CVAR_ARCHIVE);
|
||||
if (in_sdlbackbutton)
|
||||
cvar = Cvar_Get("in_sdlbackbutton", "0", CVAR_ARCHIVE);
|
||||
if (cvar)
|
||||
{
|
||||
switch ((int)in_sdlbackbutton->value)
|
||||
switch ((int)cvar->value)
|
||||
{
|
||||
case 1:
|
||||
sdl_back_button = SDL_CONTROLLER_BUTTON_START;
|
||||
|
@ -1640,6 +1640,12 @@ IN_Controller_Init(qboolean notify_user)
|
|||
}
|
||||
}
|
||||
|
||||
cvar = Cvar_Get("in_initjoy", "1", CVAR_NOSET);
|
||||
if (!cvar->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (notify_user)
|
||||
{
|
||||
Com_Printf("- Game Controller init attempt -\n");
|
||||
|
|
|
@ -2508,6 +2508,7 @@ static const char *idcredits[] = {
|
|||
"Sander van Dijk",
|
||||
"Denis Pauk",
|
||||
"Bjorn Alfredsson",
|
||||
"Jaime Moreira",
|
||||
"",
|
||||
"Quake II(tm) (C)1997 Id Software, Inc.",
|
||||
"All Rights Reserved. Distributed by",
|
||||
|
|
Loading…
Reference in a new issue