Skip to content
Snippets Groups Projects
Commit 9542a47f authored by SteelT's avatar SteelT
Browse files

New -noxinput and -nohidapi command line parameters.

parent 0051eb70
No related branches found
No related tags found
2 merge requests!488Merge in next and don't billboard papersprites in GL,!468-noxinput and -nohidapi command line parameters.
...@@ -1402,7 +1402,13 @@ static int joy_open2(const char *fname) ...@@ -1402,7 +1402,13 @@ static int joy_open2(const char *fname)
void I_InitJoystick(void) void I_InitJoystick(void)
{ {
I_ShutdownJoystick(); I_ShutdownJoystick();
if (M_CheckParm("-noxinput"))
SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE);
if (M_CheckParm("-nohidapi"))
SDL_SetHintWithPriority("SDL_JOYSTICK_HIDAPI", "0", SDL_HINT_OVERRIDE);
if (!strcmp(cv_usejoystick.string, "0") || M_CheckParm("-nojoy")) if (!strcmp(cv_usejoystick.string, "0") || M_CheckParm("-nojoy"))
return; return;
if (joy_open(cv_usejoystick.string) != -1) if (joy_open(cv_usejoystick.string) != -1)
...@@ -1418,7 +1424,13 @@ void I_InitJoystick(void) ...@@ -1418,7 +1424,13 @@ void I_InitJoystick(void)
void I_InitJoystick2(void) void I_InitJoystick2(void)
{ {
I_ShutdownJoystick2(); I_ShutdownJoystick2();
if (M_CheckParm("-noxinput"))
SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE);
if (M_CheckParm("-nohidapi"))
SDL_SetHintWithPriority("SDL_JOYSTICK_HIDAPI", "0", SDL_HINT_OVERRIDE);
if (!strcmp(cv_usejoystick2.string, "0") || M_CheckParm("-nojoy")) if (!strcmp(cv_usejoystick2.string, "0") || M_CheckParm("-nojoy"))
return; return;
if (joy_open2(cv_usejoystick2.string) != -1) if (joy_open2(cv_usejoystick2.string) != -1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment