mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-20 08:21:08 +00:00
Merge pull request #857 from protocultor/gyro_bluetooth
Gyro aiming through Bluetooth for PS4 & PS5 controllers
This commit is contained in:
commit
2cb98b7a1d
2 changed files with 10 additions and 2 deletions
|
@ -1425,6 +1425,14 @@ IN_Controller_Init(qboolean notify_user)
|
|||
|
||||
if (!SDL_WasInit(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC))
|
||||
{
|
||||
|
||||
#ifdef SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE // extended input reports on PS controllers (enables gyro thru bluetooth)
|
||||
SDL_SetHint( SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1" );
|
||||
#endif
|
||||
#ifdef SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE
|
||||
SDL_SetHint( SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1" );
|
||||
#endif
|
||||
|
||||
if (SDL_Init(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) == -1)
|
||||
{
|
||||
Com_Printf ("Couldn't init SDL joystick: %s.\n", SDL_GetError ());
|
||||
|
|
|
@ -1882,7 +1882,7 @@ Joy_MenuInit(void)
|
|||
s_joy_yawsensitivity_slider.generic.name = "yaw sensitivity";
|
||||
s_joy_yawsensitivity_slider.generic.callback = JoyYawSensitivityFunc;
|
||||
s_joy_yawsensitivity_slider.minvalue = 0;
|
||||
s_joy_yawsensitivity_slider.maxvalue = 20;
|
||||
s_joy_yawsensitivity_slider.maxvalue = 70;
|
||||
Menu_AddItem(&s_joy_menu, (void *)&s_joy_yawsensitivity_slider);
|
||||
|
||||
s_joy_pitchsensitivity_slider.curvalue = joy_pitchsensitivity->value * 10;
|
||||
|
@ -1893,7 +1893,7 @@ Joy_MenuInit(void)
|
|||
s_joy_pitchsensitivity_slider.generic.name = "pitch sensitivity";
|
||||
s_joy_pitchsensitivity_slider.generic.callback = JoyPitchSensitivityFunc;
|
||||
s_joy_pitchsensitivity_slider.minvalue = 0;
|
||||
s_joy_pitchsensitivity_slider.maxvalue = 20;
|
||||
s_joy_pitchsensitivity_slider.maxvalue = 70;
|
||||
Menu_AddItem(&s_joy_menu, (void *)&s_joy_pitchsensitivity_slider);
|
||||
|
||||
y += 10;
|
||||
|
|
Loading…
Reference in a new issue