This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 5th, 2011  |  syntax: None  |  size: 1.27 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/apps/misc.c b/apps/misc.c
  2. index 72457cd..70b9f89 100644
  3. --- a/apps/misc.c
  4. +++ b/apps/misc.c
  5. @@ -875,6 +875,7 @@ void system_sound_play(enum system_sound sound)
  6.  /* Produce keyclick based upon button and global settings */
  7.  void keyclick_click(int button)
  8.  {
  9. +    static long last_button = BUTTON_NONE;
  10.      /* Settings filters */
  11.      if (global_settings.keyclick &&
  12.          (global_settings.keyclick_repeats || !(button & BUTTON_REPEAT)))
  13. @@ -883,8 +884,23 @@ void keyclick_click(int button)
  14.          if (button != BUTTON_NONE && !(button & BUTTON_REL)
  15.              && !(button & (SYS_EVENT|BUTTON_MULTIMEDIA)) )
  16.          {
  17. -            system_sound_play(SOUND_KEYCLICK);
  18. +#ifdef HAVE_SCROLLWHEEL
  19. +            if (last_button & (BUTTON_SCROLL_BACK | BUTTON_SCROLL_FWD))
  20. +                system_sound_play(SOUND_KEYCLICK);
  21. +            else
  22. +#endif
  23. +            if ((button & BUTTON_REPEAT) && (last_button == BUTTON_NONE))
  24. +            {
  25. +                last_button = button;
  26. +                system_sound_play(SOUND_KEYCLICK);
  27. +            )
  28. +            else
  29. +            {
  30. +                last_button = button;
  31. +            }
  32.          }
  33. +        else
  34. +            last_button = BUTTON_NONE;
  35.      }
  36.  }
  37.  #endif /* CONFIG_CODEC == SWCODEC */
  38.  
  39.  
clone this paste RAW Paste Data