Advertisement
krishean

EDuke32 patch for Ubuntu 18.04

Nov 29th, 2021
1,452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.46 KB | None | 0 0
  1. diff --git a/source/build/src/sdlayer.cpp b/source/build/src/sdlayer.cpp
  2. index e3671a099..3e4aa810b 100644
  3. --- a/source/build/src/sdlayer.cpp
  4. +++ b/source/build/src/sdlayer.cpp
  5. @@ -962,9 +962,11 @@ void joyScanDevices()
  6.  
  7.                  inputdevices |= DEV_JOYSTICK;
  8.  
  9. +#if SDL_MINOR_VERSION > 0 || SDL_PATCHLEVEL >= 9
  10.                  if (!SDL_GameControllerRumble(controller, 0xc000, 0xc000, 10))
  11.                      joystick.hasRumble = 1;
  12.                  else buildprintf("%s\n", SDL_GetError());
  13. +#endif
  14.  
  15.                  return;
  16.              }
  17. @@ -1008,7 +1010,7 @@ void joyScanDevices()
  18.                  SDL_JoystickEventState(SDL_ENABLE);
  19.                  inputdevices |= DEV_JOYSTICK;
  20.  
  21. -#if SDL_MAJOR_VERSION >= 2
  22. +#if SDL_MAJOR_VERSION >= 2 && (SDL_MINOR_VERSION > 0 || SDL_PATCHLEVEL >= 9)
  23.                  if (!SDL_JoystickRumble(joydev, 0xffff, 0xffff, 200))
  24.                      joystick.hasRumble = 1;
  25.                  else buildprintf("%s\n", SDL_GetError());
  26. @@ -2540,6 +2542,7 @@ int32_t handleevents(void)
  27.  
  28.      int32_t rv;
  29.  
  30. +#if SDL_MAJOR_VERSION >= 2 && (SDL_MINOR_VERSION > 0 || SDL_PATCHLEVEL >= 9)
  31.      if (joystick.hasRumble)
  32.      {
  33.          if (joystick.rumbleLow || joystick.rumbleHigh)
  34. @@ -2547,6 +2550,7 @@ int32_t handleevents(void)
  35.  
  36.          joystick.rumbleTime = joystick.rumbleLow = joystick.rumbleHigh = 0;
  37.      }
  38. +#endif
  39.  
  40.      if (g_mouseBits & 2 && osd->flags & OSD_CAPTURE && SDL_HasClipboardText())
  41.      {
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement