mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Finally commit FS#5111 - piezo clicker for ipods!
Origional implementation by Robert Keevil with contributions from Frederik Vestre, Stoyan Stratev, Craig Elliott, Michael Sparmann, Thomas Schott, Rosso Maltese, and syncs from a bunch of other people! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30995 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b7508a766d
commit
be716c0be8
20 changed files with 481 additions and 2 deletions
26
apps/misc.c
26
apps/misc.c
|
@ -94,6 +94,10 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_HARDWARE_CLICK
|
||||
#include "piezo.h"
|
||||
#endif
|
||||
|
||||
/* units used with output_dyn_value */
|
||||
const unsigned char * const byte_units[] =
|
||||
{
|
||||
|
@ -873,14 +877,32 @@ void system_sound_play(enum system_sound sound)
|
|||
void keyclick_click(int button)
|
||||
{
|
||||
/* Settings filters */
|
||||
if (global_settings.keyclick &&
|
||||
(global_settings.keyclick_repeats || !(button & BUTTON_REPEAT)))
|
||||
if (
|
||||
#ifdef HAVE_HARDWARE_CLICK
|
||||
(global_settings.keyclick || global_settings.keyclick_hardware)
|
||||
#else
|
||||
global_settings.keyclick
|
||||
#endif
|
||||
&& (global_settings.keyclick_repeats || !(button & BUTTON_REPEAT)))
|
||||
{
|
||||
/* Button filters */
|
||||
if (button != BUTTON_NONE && !(button & BUTTON_REL)
|
||||
&& !(button & (SYS_EVENT|BUTTON_MULTIMEDIA)) )
|
||||
{
|
||||
#ifdef HAVE_HARDWARE_CLICK
|
||||
if (global_settings.keyclick)
|
||||
{
|
||||
system_sound_play(SOUND_KEYCLICK);
|
||||
}
|
||||
if (global_settings.keyclick_hardware)
|
||||
{
|
||||
#if !defined(SIMULATOR)
|
||||
piezo_button_beep(false, false);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
system_sound_play(SOUND_KEYCLICK);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue